gallows as state var

This commit is contained in:
Ben Harris 2017-05-01 03:03:27 -04:00
parent ff0ee7361f
commit 467e9741ad
1 changed files with 11 additions and 2 deletions

View File

@ -6,13 +6,12 @@ use BenBot\Utils;
final class Hangman final class Hangman
{ {
private static $bot; private static $bot;
private static $gallows;
public static function register(&$that) public static function register(&$that)
{ {
self::$bot = $that; self::$bot = $that;
self::$gallows = " self::$bot->hangman['gallows'] = "
_______ _______
|/ | |/ |
| (_) | (_)
@ -60,6 +59,16 @@ final class Hangman
$gameid = $msg->channel->id; $gameid = $msg->channel->id;
self::$bot->hangman[$gameid] = [ self::$bot->hangman[$gameid] = [
'active' => false, 'active' => false,
'gallows' => '
_______
|/ |
|
|
|
|
|
_|___
'
]; ];
self::$bot->hangman['readygame'] = [ self::$bot->hangman['readygame'] = [
'originator' => $msg->author, 'originator' => $msg->author,