rpsg 0.0.5 → 0.0.6
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/.gitignore +4 -0
- data/README.md +18 -8
- data/lib/Constants.rb +2 -2
- data/lib/rps/version.rb +1 -1
- data/rps.gemspec +2 -2
- 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: d1689b34d77dd3d4188d824b9b4ef39c0cf4f1ce
|
4
|
+
data.tar.gz: a66b580efc31d461f0a9e9a2a8b4b73009c0a01a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f05f3a8921bb724433197ac4ab6bc2143bbe366887f9c493f12d7a51da3aa39530a45e541dff61cd8412e28ece800913e72fb9ead0b2c9cfb35dfaa36d37fd9a
|
7
|
+
data.tar.gz: 4ac83203c045faa054750a706ba30ab23db95a0d3403ea860081c4e98bc3203bc9ff8e429f0b91d3ba19fdd805b00fda69a611c74c6063eff9cf3d12dd12bb8b
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,25 +1,35 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
RPSG (Rock Paper Scissors Game)
|
2
|
+
===============================
|
3
|
+
|
4
|
+
Requirements
|
5
|
+
------------
|
6
|
+
|
7
|
+
### For Windows
|
8
|
+
|
9
|
+
+ Ruby
|
10
|
+
- RubyGems
|
3
11
|
|
4
|
-
|
12
|
+
### For Mac
|
5
13
|
|
6
14
|
+ Ruby
|
7
15
|
- RubyGems
|
16
|
+
* RVM
|
17
|
+
|
18
|
+
How To Use
|
19
|
+
----------
|
8
20
|
|
9
|
-
|
10
|
-
-----------
|
21
|
+
### Windows
|
11
22
|
|
12
23
|
1. Open `cmd` as non-admin
|
13
24
|
2. type the following: `gem install rpsg`
|
14
25
|
3. run the following: `rps`
|
15
26
|
|
16
|
-
|
17
|
-
-------
|
27
|
+
### Mac
|
18
28
|
|
19
29
|
1. Open `Terminal`
|
20
30
|
2. type the following: `gem install rpsg`
|
21
31
|
3. run the following: `rps`
|
22
32
|
|
23
|
-
|
33
|
+
________
|
24
34
|
|
25
35
|
RubyGems page: [https://rubygems.org/gems/rpsg](https://rubygems.org/gems/rpsg)
|
data/lib/Constants.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Constants
|
2
|
-
CHOICES = [['r', 'rock'], ['p', 'paper'], ['s', 'scissors']]
|
2
|
+
CHOICES = [['r', 'rock'], ['p', 'paper'], ['s', 'scissors']] # create 2d list of choices
|
3
3
|
NTRY_TO_SYM = { # define entry to symbol (key to value)
|
4
4
|
CHOICES[0][0] => :ROCK , CHOICES[0][1] => :ROCK ,
|
5
5
|
CHOICES[1][0] => :PAPER , CHOICES[1][1] => :PAPER ,
|
6
6
|
CHOICES[2][0] => :SCISSORS, CHOICES[2][1] => :SCISSORS
|
7
7
|
}
|
8
|
-
VALID_ENTRIES = NTRY_TO_SYM.keys #
|
8
|
+
VALID_ENTRIES = NTRY_TO_SYM.keys # define valid entries
|
9
9
|
COMPUTER_CHOICES = NTRY_TO_SYM.values # define computer choices
|
10
10
|
WINNERS = [
|
11
11
|
# format: player choice, computer choice
|
data/lib/rps/version.rb
CHANGED
data/rps.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "rpsg"
|
3
|
-
spec.version = "0.0.
|
3
|
+
spec.version = "0.0.6"
|
4
4
|
spec.date = "2017-10-12"
|
5
5
|
spec.summary = "A Rock Paper Scissors Game Ruby Gem"
|
6
6
|
spec.description = <<-EOF
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.extra_rdoc_files = "README.md"
|
23
23
|
spec.bindir = "bin"
|
24
24
|
spec.metadata = {
|
25
|
-
"issue_tracker" => "https://github.com/bag3318/rpsg/issues"
|
25
|
+
"issue_tracker" => "https://github.com/bag3318/rpsg/issues",
|
26
26
|
"source_code" => "https://github.com/bag3318/rpsg"
|
27
27
|
}
|
28
28
|
spec.executables << "rps"
|