bin/rps in PlayRockPaperScissorsGame-1.5.6 vs bin/rps in PlayRockPaperScissorsGame-1.5.7
- old
+ new
@@ -11,11 +11,11 @@
class PlayRockPaperScissorsGame
require "colorized_string";
ColorizedString.colors;
ColorizedString.modes;
-
+
class RPS
protected;
module Constants
NTRY_TO_SYM = { 'p' => :PAPER, 'r' => :ROCK, 's' => :SCISSORS };
@@ -37,10 +37,10 @@
end;
continue(Constants::INIT_STRINGS[0], Constants::INIT_STRINGS[1], Constants::INIT_STRINGS[2]);
def initialize
@player_score = @computer_score = @ties = 0;
end;
- def testPlay(winning_score)
+ def Play(winning_score)
while @player_score < winning_score && @computer_score < winning_score
puts ColorizedString["Player score: #{@player_score}, "].colorize(:blue) +
ColorizedString["Computer score: #{@computer_score}, Ties: #{@ties}"].colorize(:blue);
player = PrivateMethods.player_choice;
computer = Constants::COMPUTER_CHOICES.sample;