bin/rps in PlayRockPaperScissorsGame-1.2.4 vs bin/rps in PlayRockPaperScissorsGame-1.2.5

- old
+ new

@@ -3,27 +3,15 @@ class PlayRockPaperScissorsGame class RPS module Constants - NTRY_TO_SYM = { - 'p' => :PAPER, - 'r' => :ROCK, - 's' => :SCISSORS - }; + 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] - ]; # format: player choice, computer choice + WINNERS = [[:SCISSORS, :PAPER], [:PAPER, :ROCK], [:ROCK, :SCISSORS]]; # format: player choice, computer choice LOSERS = WINNERS.map { |i,j| [j,i] }; # this will take the original WINNERS array and flip the symbols, thus returning a loss for the user/player - INIT_STRINGS = [ - "You are about to enter a rock-paper-scissors best of 3 match.", - "Press the return/enter key to continue...", - "" - ]; + INIT_STRINGS = ["You are about to enter a rock-paper-scissors best of 3 match.", "Press the return/enter key to continue...", ""]; end; class RockPaperScissors class << self def continue(str1, str2, str3)