PlayRockPaperScissorsGame 2.8.8 → 2.8.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/bin/rps +6 -6
- data/docs/Code.md +1 -1
- data/docs/Comparing_Code.md +1 -1
- data/docs/_site/about.html +1 -1
- data/docs/_site/code.html +2 -2
- data/docs/_site/comparing_code.html +2 -2
- data/docs/_site/how_to_build.html +1 -1
- data/docs/_site/how_to_run.html +1 -1
- data/docs/_site/index.html +1 -1
- data/docs/_site/testing.html +1 -1
- data/lib/rps/version.rb +1 -1
- data/rps.gemspec +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 205cd88c3b90457f1b3a5b4c5581f1c236b84931
|
4
|
+
data.tar.gz: 14d2c641fa43582fea976913675330d033c7fc7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30c714cd6d4f04fb8ab775634409837c40de0f74f0543c2f94ccd4e39289621e227bfc5d765b18ed238d37db64d344495b2f72213630641c9d1f6bef97cfeaf5
|
7
|
+
data.tar.gz: 91392a8c7183534b0c05c0b60fc4fd4a3813ce935c93c3c754c5859f89d01a9875b57fcfb28b364b6d8add0f2fbef7ef6647d6053ff4bb4b2b6a573d0bb1fa68
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/bin/rps
CHANGED
@@ -39,17 +39,17 @@ class PlayRockPaperScissorsGame
|
|
39
39
|
def play(winning_score)
|
40
40
|
while @player_score < winning_score && @computer_score < winning_score
|
41
41
|
puts ColorizedString["Player score: #{@player_score}, "].colorize(:blue) +
|
42
|
-
ColorizedString["Computer score: #{@computer_score}, Ties: #{@ties}"].colorize(:blue)
|
42
|
+
ColorizedString["Computer score: #{@computer_score}, Ties: #{@ties}."].colorize(:blue)
|
43
43
|
player = PrivateMethods.player_choice
|
44
44
|
computer = Constants::COMPUTER_CHOICES.sample # chooses a random option
|
45
|
-
puts ColorizedString["\nPlayer chooses #{player.to_s.downcase}"].colorize(:blue)
|
46
|
-
puts ColorizedString["Computer chooses #{computer.to_s.downcase}"].colorize(:blue)
|
45
|
+
puts ColorizedString["\nPlayer chooses #{player.to_s.downcase}."].colorize(:blue)
|
46
|
+
puts ColorizedString["Computer chooses #{computer.to_s.downcase}."].colorize(:blue)
|
47
47
|
case PrivateMethods.player_outcome [player, computer]
|
48
48
|
when :WIN
|
49
|
-
puts ColorizedString["#{player.to_s.capitalize} beats #{computer.to_s.downcase}, player wins the round"].colorize(:red)
|
49
|
+
puts ColorizedString["#{player.to_s.capitalize} beats #{computer.to_s.downcase}, player wins the round."].colorize(:red)
|
50
50
|
@player_score += 1
|
51
51
|
when :LOSE
|
52
|
-
puts ColorizedString["#{computer.to_s.capitalize} beats #{player.to_s.downcase}, computer wins the round"].colorize(:red)
|
52
|
+
puts ColorizedString["#{computer.to_s.capitalize} beats #{player.to_s.downcase}, computer wins the round."].colorize(:red)
|
53
53
|
@computer_score += 1
|
54
54
|
else
|
55
55
|
puts ColorizedString["Tie, choose again"].colorize(:red)
|
@@ -57,7 +57,7 @@ class PlayRockPaperScissorsGame
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
puts ColorizedString["\nFinal score: player: #{@player_score}, "].colorize(:blue) +
|
60
|
-
ColorizedString["computer: #{@computer_score} (ties: #{@ties})"].colorize(:blue)
|
60
|
+
ColorizedString["computer: #{@computer_score} (ties: #{@ties})."].colorize(:blue)
|
61
61
|
case PrivateMethods.final_outcome(@player_score, @computer_score)
|
62
62
|
when :WIN
|
63
63
|
puts ColorizedString["Player wins!"].colorize(:red)
|
data/docs/Code.md
CHANGED
data/docs/Comparing_Code.md
CHANGED
data/docs/_site/about.html
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
8
8
|
<meta name="theme-color" content="#157878"/>
|
9
9
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
|
10
|
-
<link rel="stylesheet" href="/assets/css/style.css?v=
|
10
|
+
<link rel="stylesheet" href="/assets/css/style.css?v=8195008b66ecb2a21909413ab088f826f6525ede"/>
|
11
11
|
<script src="assets/js/pace.min.js"></script>
|
12
12
|
|
13
13
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
|
data/docs/_site/code.html
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
8
8
|
<meta name="theme-color" content="#157878"/>
|
9
9
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
|
10
|
-
<link rel="stylesheet" href="/assets/css/style.css?v=
|
10
|
+
<link rel="stylesheet" href="/assets/css/style.css?v=8195008b66ecb2a21909413ab088f826f6525ede"/>
|
11
11
|
<script src="assets/js/pace.min.js"></script>
|
12
12
|
|
13
13
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
|
@@ -69,7 +69,7 @@
|
|
69
69
|
<span class="k">class</span> <span class="nc">PlayRockPaperScissorsGame</span>
|
70
70
|
|
71
71
|
<span class="k">module</span> <span class="nn">RockPaperScissors</span>
|
72
|
-
<span class="no">VERSION</span> <span class="o">=</span> <span class="s2">"2.8.
|
72
|
+
<span class="no">VERSION</span> <span class="o">=</span> <span class="s2">"2.8.9"</span>
|
73
73
|
<span class="k">end</span>
|
74
74
|
|
75
75
|
<span class="c1"># import the colorize gem</span>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
8
8
|
<meta name="theme-color" content="#157878"/>
|
9
9
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
|
10
|
-
<link rel="stylesheet" href="/assets/css/style.css?v=
|
10
|
+
<link rel="stylesheet" href="/assets/css/style.css?v=8195008b66ecb2a21909413ab088f826f6525ede"/>
|
11
11
|
<script src="assets/js/pace.min.js"></script>
|
12
12
|
|
13
13
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
|
@@ -189,7 +189,7 @@
|
|
189
189
|
<span class="k">class</span> <span class="nc">PlayRockPaperScissorsGame</span>
|
190
190
|
|
191
191
|
<span class="k">module</span> <span class="nn">RockPaperScissors</span>
|
192
|
-
<span class="no">VERSION</span> <span class="o">=</span> <span class="s2">"2.8.
|
192
|
+
<span class="no">VERSION</span> <span class="o">=</span> <span class="s2">"2.8.9"</span>
|
193
193
|
<span class="k">end</span>
|
194
194
|
|
195
195
|
<span class="c1"># import the colorize gem</span>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
8
8
|
<meta name="theme-color" content="#157878"/>
|
9
9
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
|
10
|
-
<link rel="stylesheet" href="/assets/css/style.css?v=
|
10
|
+
<link rel="stylesheet" href="/assets/css/style.css?v=8195008b66ecb2a21909413ab088f826f6525ede"/>
|
11
11
|
<script src="assets/js/pace.min.js"></script>
|
12
12
|
|
13
13
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
|
data/docs/_site/how_to_run.html
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
8
8
|
<meta name="theme-color" content="#157878"/>
|
9
9
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
|
10
|
-
<link rel="stylesheet" href="/assets/css/style.css?v=
|
10
|
+
<link rel="stylesheet" href="/assets/css/style.css?v=8195008b66ecb2a21909413ab088f826f6525ede"/>
|
11
11
|
<script src="assets/js/pace.min.js"></script>
|
12
12
|
|
13
13
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
|
data/docs/_site/index.html
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
8
8
|
<meta name="theme-color" content="#157878"/>
|
9
9
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
|
10
|
-
<link rel="stylesheet" href="/assets/css/style.css?v=
|
10
|
+
<link rel="stylesheet" href="/assets/css/style.css?v=8195008b66ecb2a21909413ab088f826f6525ede"/>
|
11
11
|
<script src="assets/js/pace.min.js"></script>
|
12
12
|
|
13
13
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
|
data/docs/_site/testing.html
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
8
8
|
<meta name="theme-color" content="#157878"/>
|
9
9
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
|
10
|
-
<link rel="stylesheet" href="/assets/css/style.css?v=
|
10
|
+
<link rel="stylesheet" href="/assets/css/style.css?v=8195008b66ecb2a21909413ab088f826f6525ede"/>
|
11
11
|
<script src="assets/js/pace.min.js"></script>
|
12
12
|
|
13
13
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
|
data/lib/rps/version.rb
CHANGED
data/rps.gemspec
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|