rock_paper_scissors 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 57757410361008884b9bdb6e1ef1c2332cabc699
4
- data.tar.gz: 26556863951b6a2568d2638e445a573c7488a8f5
3
+ metadata.gz: fbce4cd4b86342bb2f8c743504575e3c28069bc8
4
+ data.tar.gz: ac5d654e1f95eb9d5bfcd0732222199f7e682ca2
5
5
  SHA512:
6
- metadata.gz: c822e15c1dc52be9e23b7eaed3822a1e85c7c73623c1eab14693a5e9796cd5580ecd15ce30370f6e61315629367a02e3a1a7a477796d31a13db3d8774437c097
7
- data.tar.gz: 17e3d3da3758247219b59c454279dc82394d66fcf516e433abef01b47ff05080fae7e2353c6d799c6ab68d1e72261d9cc60ec134e59ae0e739636ef19a520ae4
6
+ metadata.gz: c8f0c36b69d19bb4e5300328f4941d49990a5f03a3616698e842b55e77fb767c7abeb25777faf557df6833b05f7e475de5aa7948d87e5a1779e987eb459bff4f
7
+ data.tar.gz: 5376045911f4f79eaa6bcc7e9d0c55b3aa6d5d9a842a00cb34140591734623a5ed7539d6e92217218f4ddb68ec208fc5e0700540637b6a5f281acc2b2a2503dc
data/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  Settle any argument with an epic Rock Paper Scissors battle. This gem allows you to run a 1 or 2 player rock paper scissors game from your command line.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
5
  ## Installation
8
6
 
9
7
  Add this line to your application's Gemfile:
@@ -38,4 +36,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/siakar
38
36
  ## License
39
37
 
40
38
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
@@ -18,23 +18,24 @@ module RockPaperScissors
18
18
  @player1.select_move
19
19
  @player2.select_move
20
20
 
21
- get_result
22
-
23
- break if quit?
21
+ break if winner
24
22
  end
23
+
24
+ play unless quit?
25
25
  end
26
26
 
27
27
  private
28
28
 
29
- def get_result
29
+ def winner
30
30
  puts "\n\n"
31
31
  if @player1.move == @player2.move
32
32
  puts "It's a draw! Let's try again!"
33
- play
34
33
  elsif player1_win?
35
34
  puts "#{@player1.name} WINS with #{@@move_lookup[@player1.move].upcase} beating #{@player2.name}'s #{@@move_lookup[@player2.move].upcase}!"
35
+ true
36
36
  else
37
37
  puts "#{@player2.name} WINS with #{@@move_lookup[@player2.move].upcase} beating #{@player1.name}'s #{@@move_lookup[@player1.move].upcase}."
38
+ true
38
39
  end
39
40
  end
40
41
 
@@ -1,3 +1,3 @@
1
1
  module RockPaperScissors
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rock_paper_scissors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sia Karamalegos