PlayRockPaperScissorsGame 1.6.7 → 1.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/exec/run.bat +0 -0
- data/lib/ref/Constants.rb +5 -3
- data/lib/ref/PrivateMethods.rb +3 -1
- data/lib/rps.rb +3 -2
- data/lib/rps/version.rb +3 -0
- data/rps.gemspec +3 -3
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7a586cf3cb3981dc67b96ef04bd145c1eb78dcd
|
4
|
+
data.tar.gz: ea849d937ea45235fc2e8ff7bcb7b65faea5cd3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ae99db73f831db08c9ec31d7e2c25f773435b3fb75dc8bc7160eddbdf1f7aabde33400316b7472e165a8a6ad4cb98110ac6868eb29cf00d763ee110f94d281b
|
7
|
+
data.tar.gz: e39c03bbef51293ad6923a521f037a00792db2ee7fba940a2e69dd595893f854eef6a7fdae4fe6d69c67239cc84fef4f592039edb68898c0606127cd53ca7c98
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/exec/run.bat
CHANGED
File without changes
|
data/lib/ref/Constants.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
require "colorized_string";
|
2
|
+
ColorizedString.colors
|
3
|
+
ColorizedString.modes
|
2
4
|
module Constants
|
3
5
|
NTRY_TO_SYM = {
|
4
6
|
'p' => :PAPER,
|
@@ -14,8 +16,8 @@ module Constants
|
|
14
16
|
]; # format: player choice, computer choice
|
15
17
|
LOSERS = WINNERS.map { |i,j| [j,i] }; # this will take the original WINNERS array and flip the symbols, thus returning a loss for the user/player
|
16
18
|
INIT_STRINGS = [
|
17
|
-
"You are about to enter a rock-paper-scissors best of 3 match.".green
|
18
|
-
"Press the return/enter key to continue...".green
|
19
|
+
ColorizedString["You are about to enter a rock-paper-scissors best of 3 match."].colorize(:green),
|
20
|
+
ColorizedString["Press the return/enter key to continue..."].colorize(:green),
|
19
21
|
""
|
20
22
|
];
|
21
23
|
end;
|
data/lib/ref/PrivateMethods.rb
CHANGED
data/lib/rps.rb
CHANGED
@@ -13,7 +13,7 @@ class PlayRockPaperScissorsGame
|
|
13
13
|
ColorizedString.modes;
|
14
14
|
|
15
15
|
class RPS
|
16
|
-
|
16
|
+
protected;
|
17
17
|
require "ref/Constants.rb";
|
18
18
|
|
19
19
|
class RockPaperScissors
|
@@ -61,7 +61,8 @@ class PlayRockPaperScissorsGame
|
|
61
61
|
end;
|
62
62
|
gets;
|
63
63
|
end;
|
64
|
-
|
64
|
+
private;
|
65
|
+
require "ref/PrivateMethods.rb";
|
65
66
|
end;
|
66
67
|
end;
|
67
68
|
end;
|
data/lib/rps/version.rb
ADDED
data/rps.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "PlayRockPaperScissorsGame"
|
3
|
-
spec.version = "1.6.
|
3
|
+
spec.version = "1.6.8"
|
4
4
|
spec.date = "2017-04-01"
|
5
5
|
spec.summary = "A Rock Paper Scissors Ruby Gem"
|
6
6
|
spec.description = "A Ruby-programmed rock paper scissors game. To install: gem install PlayRockPaperScissorsGame; To run: rps; or: PlayRockPaperScissorsGame; For issues: https://github.com/bag3318/RockPaperScissors/issues"
|
7
7
|
spec.author = "bag3318"
|
8
8
|
spec.platform = Gem::Platform::RUBY
|
9
|
-
spec.require_paths = ["lib", "lib/ref", "test", "exec", "bin"]
|
10
|
-
spec.files = ["lib/rps.rb", "lib/ref/PrivateMethods.rb", "lib/ref/Constants.rb", "exec/run.bat", "exec/rps.bash", "exec/uninstall.sh", "rps.gemspec", "Rakefile", "Gemfile", "LICENSE", "README.md"]
|
9
|
+
spec.require_paths = ["lib", "lib/ref", "lib/rps", "test", "exec", "bin"]
|
10
|
+
spec.files = ["lib/rps.rb", "lib/ref/PrivateMethods.rb", "lib/ref/Constants.rb", "lib/rps/version.rb", "exec/run.bat", "exec/rps.bash", "exec/uninstall.sh", "rps.gemspec", "Rakefile", "Gemfile", "LICENSE", "README.md"]
|
11
11
|
spec.test_files = ["test/test_rps.rb"]
|
12
12
|
spec.bindir = "bin"
|
13
13
|
spec.executables << "rps"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: PlayRockPaperScissorsGame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bag3318
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/ref/Constants.rb
|
90
90
|
- lib/ref/PrivateMethods.rb
|
91
91
|
- lib/rps.rb
|
92
|
+
- lib/rps/version.rb
|
92
93
|
- rps.gemspec
|
93
94
|
- test/test_rps.rb
|
94
95
|
homepage: https://rubygems.org/gems/PlayRockPaperScissorsGame/
|
@@ -104,6 +105,7 @@ rdoc_options: []
|
|
104
105
|
require_paths:
|
105
106
|
- lib
|
106
107
|
- lib/ref
|
108
|
+
- lib/rps
|
107
109
|
- test
|
108
110
|
- exec
|
109
111
|
- bin
|