testownik 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 +4 -4
- data/README.md +8 -7
- data/lib/testownik/RPSGame.rb +1 -1
- data/lib/testownik/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 36540e211c77a339ed8eab7b84e8d08414c2cb23
|
|
4
|
+
data.tar.gz: 8b4d1cd4801cf77a7c1253e311ac262141ef2b17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 54ecc606d6c12d7d1859e353545643e3255b2887a4094fb0ef22ca9d5b3a991ba92882dcd3a08463d1cc91dd7ddd289f6a37b4f329a8c05b172733a3709985a2
|
|
7
|
+
data.tar.gz: 156f391ebe34fefa3ccb42827feecb43c8bd12c5b7fc3249fad42ea090335112be8350d5c720662c226c81cb990e011f4fe2c124e7380363c4de478275ca543f
|
data/README.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# Testownik
|
|
2
2
|
|
|
3
|
-
Welcome to
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
3
|
+
Welcome to the Rock Paper Game.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
The game works in the Command Line where ruby was installed earlier. Here are the instructions:
|
|
10
8
|
|
|
11
9
|
```ruby
|
|
12
10
|
gem 'testownik'
|
|
@@ -20,9 +18,12 @@ Or install it yourself as:
|
|
|
20
18
|
|
|
21
19
|
$ gem install testownik
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
Once the gem is installed, in IRB or pry, type:
|
|
22
|
+
|
|
23
|
+
require 'testownik'
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
and then you can run the game typing:
|
|
26
|
+
game = Testownik::RPSGame.new.play
|
|
26
27
|
|
|
27
28
|
## Development
|
|
28
29
|
|
|
@@ -32,7 +33,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
32
33
|
|
|
33
34
|
## Contributing
|
|
34
35
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
36
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Visiona/testownik.
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
## License
|
data/lib/testownik/RPSGame.rb
CHANGED
|
@@ -55,7 +55,7 @@ module Testownik
|
|
|
55
55
|
if player_one_choice == "p" && player_two_choice == "r" ||player_one_choice == "r" && player_two_choice == "p"
|
|
56
56
|
puts "Paper Wins!!!"
|
|
57
57
|
true
|
|
58
|
-
elsif player_one_choice == "p" && player_two_choice == "s" ||player_one_choice == "s" && player_two_choice == "
|
|
58
|
+
elsif player_one_choice == "p" && player_two_choice == "s" ||player_one_choice == "s" && player_two_choice == "p"
|
|
59
59
|
puts "Scissors Wins!!!"
|
|
60
60
|
true
|
|
61
61
|
elsif player_one_choice == "s" && player_two_choice == "r" ||player_one_choice == "r" && player_two_choice == "s"
|
data/lib/testownik/version.rb
CHANGED