Module: Constants
- Defined in:
- lib/Constants.rb
Constant Summary collapse
- NTRY_TO_SYM =
{ 'p' => :PAPER, 'r' => :ROCK, 's' => :SCISSORS }
- VALID_ENTRIES =
create valid entries
NTRY_TO_SYM.keys
- COMPUTER_CHOICES =
define computer choices
NTRY_TO_SYM.values
- WINNERS =
[ # format: player choice, computer choice [:SCISSORS, :PAPER], [:PAPER , :ROCK], [:ROCK , :SCISSORS] ]
- LOSERS =
this will take the original WINNERS array and flip the symbols, thus returning a loss for the user/player
WINNERS.map { |pc,cc| [cc,pc] }
- 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), "" ]