RPSrb 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cc1a734dbecaedd4c28ac3637365e2c60d8a378
4
- data.tar.gz: 63fb84eb8f8eeb2c3c9105ef0f96ded6168f29a5
3
+ metadata.gz: ab0dd25a221e442d04cf82e9e6dc3f1144628865
4
+ data.tar.gz: ac743357ec71511950e5fdc80d82a9d59dadab8c
5
5
  SHA512:
6
- metadata.gz: 74a26d80cb9347fa424a62ce8cebf83f754aa8c5b5c29c80e3808095090f8046d81a945f7e0250c7d7201a78028d165914d88cef580e48c319800d848413ccad
7
- data.tar.gz: 9f4fe67b635255d145fee14a305e62afe5483fa1ba33e2e80fd7af91b5c20d3bde16512ce0cbdc4002ebd4eaa9aa8d3f8c0db13bf65c3cd2a17d5c467e87776c
6
+ metadata.gz: 0cf4985ffa4f1e70820faed867ea60c8c03aadc0b6ae7f81682c2b746a4fdec67de976b63362da10dee339df41a92603ba354f2cefc0b29845ae29071f1bbf01
7
+ data.tar.gz: 47fe31ed11516ce261ac885ba6d064543d94184f49c3a3d8dda83e20f854ce84ebeccece902cc883003394f558a92cbb6b3c94e6a6659ef70d7c2c0266c398d4
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "RPSrb"
3
- spec.version = "0.1.3"
3
+ spec.version = "0.1.4"
4
4
  spec.date = "2017-12-12" # format: YYYY/MM/DD
5
5
  spec.summary = "A Rock Paper Scissors Game RubyGem"
6
6
  spec.description = <<-EOF
@@ -181,15 +181,13 @@
181
181
 
182
182
  <div class="method-description">
183
183
 
184
- <h2 id="method-c-continue-label-Define+entry+point+for+game">Define entry point for game<span><a href="#method-c-continue-label-Define+entry+point+for+game">&para;</a> <a href="#top">&uarr;</a></span></h2>
185
-
186
- <p>this will provide a game intro</p>
184
+
187
185
 
188
186
 
189
187
 
190
188
 
191
189
  <div class="method-source-code" id="continue-source">
192
- <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 41</span>
190
+ <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 42</span>
193
191
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">continue</span>(<span class="ruby-identifier">str1</span>,<span class="ruby-identifier">str2</span>,<span class="ruby-identifier">str3</span>)
194
192
  <span class="ruby-identifier">puts</span> <span class="ruby-identifier">str1</span>
195
193
  <span class="ruby-identifier">print</span> <span class="ruby-identifier">str2</span>
@@ -225,7 +223,7 @@
225
223
 
226
224
 
227
225
  <div class="method-source-code" id="new-source">
228
- <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 52</span>
226
+ <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 53</span>
229
227
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
230
228
  <span class="ruby-ivar">@player_score</span> = <span class="ruby-ivar">@computer_score</span> = <span class="ruby-ivar">@ties</span> = <span class="ruby-value">0</span>
231
229
  <span class="ruby-keyword">end</span></pre>
@@ -268,7 +266,7 @@
268
266
 
269
267
 
270
268
  <div class="method-source-code" id="final_outcome-source">
271
- <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 116</span>
269
+ <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 117</span>
272
270
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">final_outcome</span>(<span class="ruby-identifier">pl</span>, <span class="ruby-identifier">co</span>)
273
271
  <span class="ruby-keyword">return</span> <span class="ruby-value">:WIN</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">pl</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">co</span>
274
272
  <span class="ruby-keyword">return</span> <span class="ruby-value">:LOSE</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">pl</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">co</span>
@@ -304,7 +302,7 @@
304
302
 
305
303
 
306
304
  <div class="method-source-code" id="play-source">
307
- <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 58</span>
305
+ <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 59</span>
308
306
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">play</span>(<span class="ruby-identifier">winning_score</span>)
309
307
  <span class="ruby-keyword">while</span> <span class="ruby-ivar">@player_score</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">winning_score</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@computer_score</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">winning_score</span>
310
308
  <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\nPlayer score: #{@player_score}, &quot;</span> <span class="ruby-operator">+</span>
@@ -367,7 +365,7 @@
367
365
 
368
366
 
369
367
  <div class="method-source-code" id="player_choice-source">
370
- <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 92</span>
368
+ <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 93</span>
371
369
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">player_choice</span>
372
370
  <span class="ruby-identifier">loop</span> <span class="ruby-keyword">do</span>
373
371
  <span class="ruby-identifier">print</span> <span class="ruby-string">&quot;\nChoose: Rock (r), Paper (p), or Scissors (s): &quot;</span>
@@ -412,7 +410,7 @@
412
410
 
413
411
 
414
412
  <div class="method-source-code" id="player_outcome-source">
415
- <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 108</span>
413
+ <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 109</span>
416
414
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">player_outcome</span>(<span class="ruby-identifier">plays</span>)
417
415
  <span class="ruby-keyword">return</span> <span class="ruby-value">:WIN</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">WINNERS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">plays</span>)
418
416
  <span class="ruby-keyword">return</span> <span class="ruby-value">:LOSE</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">LOSERS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">plays</span>)
@@ -1,4 +1,4 @@
1
- Tue, 12 Dec 2017 11:15:03 -0800
1
+ Tue, 12 Dec 2017 11:25:42 -0800
2
2
  lib/exec.rb Tue, 12 Dec 2017 09:59:08 -0800
3
- lib/RockPaperScissors.rb Tue, 12 Dec 2017 11:14:21 -0800
4
- lib/RPSrb/Version.rb Tue, 12 Dec 2017 10:10:48 -0800
3
+ lib/RockPaperScissors.rb Tue, 12 Dec 2017 11:25:10 -0800
4
+ lib/RPSrb/Version.rb Tue, 12 Dec 2017 11:25:18 -0800
Binary file
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["rpsrb","rockpaperscissors","continue()","final_outcome()","new()","play()","player_choice()","player_outcome()"],"longSearchIndex":["rpsrb","rockpaperscissors","rockpaperscissors::continue()","rockpaperscissors#final_outcome()","rockpaperscissors::new()","rockpaperscissors#play()","rockpaperscissors#player_choice()","rockpaperscissors#player_outcome()"],"info":[["RPSrb","","RPSrb.html","","<p>RubyGems version constant\n<p>this is required for all rubygem packages\n"],["RockPaperScissors","","RockPaperScissors.html","",""],["continue","RockPaperScissors","RockPaperScissors.html#method-c-continue","(str1,str2,str3)","<p>Define entry point for game\n<p>this will provide a game intro\n"],["final_outcome","RockPaperScissors","RockPaperScissors.html#method-i-final_outcome","(pl, co)","<p>Define final outcome function\n<p>this will determine who wins the whole match in the end\n"],["new","RockPaperScissors","RockPaperScissors.html#method-c-new","()","<p>Define constructor for class\n"],["play","RockPaperScissors","RockPaperScissors.html#method-i-play","(winning_score)","<p>Define play game method\n<p>it will also constain most of the “play” functioonality for this game …\n"],["player_choice","RockPaperScissors","RockPaperScissors.html#method-i-player_choice","()","<p>Make player choice method\n<p>this will sanity check the user&#39;s choice\n"],["player_outcome","RockPaperScissors","RockPaperScissors.html#method-i-player_outcome","(plays)","<p>Define player outcome\n<p>this defines the round outcome of the game\n"]]}}
1
+ var search_data = {"index":{"searchIndex":["rpsrb","rockpaperscissors","continue()","final_outcome()","new()","play()","player_choice()","player_outcome()"],"longSearchIndex":["rpsrb","rockpaperscissors","rockpaperscissors::continue()","rockpaperscissors#final_outcome()","rockpaperscissors::new()","rockpaperscissors#play()","rockpaperscissors#player_choice()","rockpaperscissors#player_outcome()"],"info":[["RPSrb","","RPSrb.html","","<p>RubyGems version constant\n<p>this is required for all rubygem packages\n"],["RockPaperScissors","","RockPaperScissors.html","",""],["continue","RockPaperScissors","RockPaperScissors.html#method-c-continue","(str1,str2,str3)",""],["final_outcome","RockPaperScissors","RockPaperScissors.html#method-i-final_outcome","(pl, co)","<p>Define final outcome function\n<p>this will determine who wins the whole match in the end\n"],["new","RockPaperScissors","RockPaperScissors.html#method-c-new","()","<p>Define constructor for class\n"],["play","RockPaperScissors","RockPaperScissors.html#method-i-play","(winning_score)","<p>Define play game method\n<p>it will also constain most of the “play” functioonality for this game …\n"],["player_choice","RockPaperScissors","RockPaperScissors.html#method-i-player_choice","()","<p>Make player choice method\n<p>this will sanity check the user&#39;s choice\n"],["player_outcome","RockPaperScissors","RockPaperScissors.html#method-i-player_outcome","(plays)","<p>Define player outcome\n<p>this defines the round outcome of the game\n"]]}}
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # = RubyGems version constant
2
2
  # this is required for all rubygem packages
3
3
  module RPSrb
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
@@ -35,9 +35,10 @@ class RockPaperScissors
35
35
  # this flips the items in the `WINNERS` 2d array
36
36
  LOSERS = WINNERS.map { |winning_choice,losing_choice| [losing_choice,winning_choice] }
37
37
 
38
+
39
+ # == Define entry point for game
40
+ # this will provide a game intro
38
41
  class << self
39
- # == Define entry point for game
40
- # this will provide a game intro
41
42
  def continue(str1,str2,str3)
42
43
  puts str1
43
44
  print str2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RPSrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - bag3318