Sha256: 07cf5e6ac96bca659b75fe0b3c4ee1e67ab208023affa865d581784cc4f12f34
Contents?: true
Size: 893 Bytes
Versions: 1
Compression:
Stored size: 893 Bytes
Contents
module GooseGame module Messages module In PLAYER = /add player (?<name>\w+)/i MOVE = /move (?<name>\w+) (?<d1>\d+), (?<d2>\d+)/i MOVE_ROLL = /move (?<name>\w+)/i HELP = /help/i EXIT = /exit/i end module Out HELP = ["available commands:", "* add player <player_name>", "* move <player_name> 4, 5", "* move <player_name>", "* help", "* exit"].join("\n") UNKNOWN = "can you repeat please?" NO_PLAYER = -> (player) { "#{player}: not an existing player"} PLAYERS = -> (players) { "players: #{players.join(', ')}" } EXISTING = -> (player) { "#{player}: already existing player" } ROLL = -> (player, dice) { "#{player} rolls #{dice.d1}, #{dice.d2}" } PRANK = -> (player, prank) { ". On #{player.position} there is #{prank}, who returns to #{player.prev}" } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
goose_game-1.0.0 | lib/goose_game/messages.rb |