Module: Constants

Defined in:
lib/ref/Constants.rb

Constant Summary collapse

NTRY_TO_SYM =
{ 
  'p' => :PAPER, 
  'r' => :ROCK, 
  's' => :SCISSORS 
}
VALID_ENTRIES =
NTRY_TO_SYM.keys
COMPUTER_CHOICES =
NTRY_TO_SYM.values
WINNERS =
[
  [:SCISSORS, :PAPER], 
  [:PAPER, :ROCK], 
  [:ROCK, :SCISSORS]
]
LOSERS =

format: player choice, computer choice

WINNERS.map { |i,j| [j,i] }
INIT_STRINGS =
[
  ColorizedString["You are about to enter a rock-paper-scissors best of 3 match."].colorize(:green), 
  ColorizedString["Press the return/enter key to continue..."].colorize(:green), 
  ""
]