abstract class Game
- Game
- Reference
- Object
Direct Known Subclasses
Defined in:
common/game.crserver/game.cr
Constant Summary
-
GAME_TYPE =
{"RPS" => RockPaperScissors, "C4" => FourInARow, "Fight" => Fight}
Instance Method Summary
- #add_player(player : Player)
- #broadcast(msg, player2socket)
- #id : GameId
- #min_players : Int32
- #parse_move?(move) : Game::Move | Nil
- #play(player_id : PlayerId, move : Move)
- #play!(player_id, move)
- #players : Array(Player)
- #players=(players : Array(Player))
- #remove_player(player_id)
- #status : GameStatus
- #turn : PlayerId | Nil