Module: BetweenTheSheets::Game::Messages

Included in:
BetweenTheSheets::Game
Defined in:
lib/between_the_sheets/game/messages.rb

Constant Summary collapse

MESSAGES =
{
  error: "\nSorry, there was an error.".colorize(:orange),
  exit: "\nGood bye.",
  game_over: "GAME OVER".colorize(:red),
  lose: "You LOSE!".colorize(:red),
  win: "You WIN!".colorize(:green),
  jackpot: "JACKPOT!".colorize(:green),
  banner: "\n\n          \u2664 \u2661  BETWEEN THE SHEETS \u2662 \u2667\n\n"
}.freeze

Instance Method Summary collapse

Instance Method Details

#helpObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/between_the_sheets/game/messages.rb', line 18

def help
  "\n  KEY COMMANDS:\n\n  e or q at any prompt will quit the game.\n  h or help prints the message.\n\n  GAME RULES:\n\n  The dealer draws 2 cards and places them face up. Next, the player may\n  bet up to the entire pot or any portion of the number of chips in the\n  pot, but he must always bet a minimum of \#{Game::Constants::MINIMUM_BET}\n  chip. When the player has placed a bet, the dealer turns up the top card\n  from the pack and places it between the two cards already face up.\n  If the card ranks between the two cards already face up, the player\n  wins and takes back the amount of his bet plus an equivalent amount\n  from the pot. If the third card is not between the face-up cards, or\n  is of the same rank as either of them, the player loses his bet, and\n  it is added to the pot. If the two face-up cards up are consecutive,\n  the player automatically loses, and a third card need not be turned up.\n  If the two face-up cards are the same, the player wins two chips and,\n  again, no third card is turned up.\n\n  \"Acey-Deucey\" (ace, 2) is the best combination, and a player tends to\n  bet the whole pot, if he can. This is because the only way an\n  ace-deuce combination can lose is if the third card turned up is also\n  an ace or a deuce.\n\n  Game rules taken and slightly modified from:\n  http://www.bicyclecards.com/how-to-play/in-between/#sthash.aJuEouh8.dpuf\n\n  TXT\nend\n"

#message(name) ⇒ Object



14
15
16
# File 'lib/between_the_sheets/game/messages.rb', line 14

def message(name)
  MESSAGES.fetch(name) { help }
end