PlayRockPaperScissorsGame 1.2.4 → 1.2.5

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/PlayRockPaperScissorsGame +3 -15
  3. data/bin/rps +3 -15
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca5572d5c3e6eff5f9cb4f07fdeed9266729cbcc
4
- data.tar.gz: 0d90fd97d35552c1ccf0cfac7b7518535d6caeb8
3
+ metadata.gz: d35182144236e0e52a8c9f81bc15e3080df98b4f
4
+ data.tar.gz: 4339cbe3ec9016a1dee1f4e9dbfdbdd51fb52c9e
5
5
  SHA512:
6
- metadata.gz: 21f198678a505581cdfb3d5f83716a8cbe1be081f9f8581802b76a85ea7002703736fc51aea80aa0d8c7740b095d65cf4ab91068cfae56d325a1df5bb88dd2d8
7
- data.tar.gz: cd604f87a2dd68d46eadf929a0eb6aab0749b6cf6613a768323802c97a9c5171b9ebf67272380bb59add14ffcabb8f9a37a9e725e6996bdd18da2bab1697ac1b
6
+ metadata.gz: bc6977ffb823364cad75cdceae2b74147866d5b8b73c550a05c27b63cc4f9224ae7be0d266644ba1c9395570d654ff8f0a6fbaff36c58969d76b4ee0df9e9450
7
+ data.tar.gz: 5ac7e6e4558c2f3f9ed56ec15f0f4b823f48566f5d94b30b62b09fc793b8efb9d328b5d1c78199804dfb97fa8920202dca97c2c4a3640821528ca500abb13117
@@ -5,24 +5,12 @@ class PlayRockPaperScissorsGame
5
5
  class RPS
6
6
 
7
7
  module Constants
8
- NTRY_TO_SYM = {
9
- 'p' => :PAPER,
10
- 'r' => :ROCK,
11
- 's' => :SCISSORS
12
- };
8
+ NTRY_TO_SYM = { 'p' => :PAPER, 'r' => :ROCK, 's' => :SCISSORS };
13
9
  VALID_ENTRIES = NTRY_TO_SYM.keys;
14
10
  COMPUTER_CHOICES = NTRY_TO_SYM.values;
15
- WINNERS = [
16
- [:SCISSORS, :PAPER],
17
- [:PAPER, :ROCK],
18
- [:ROCK, :SCISSORS]
19
- ]; # format: player choice, computer choice
11
+ WINNERS = [[:SCISSORS, :PAPER], [:PAPER, :ROCK], [:ROCK, :SCISSORS]]; # format: player choice, computer choice
20
12
  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
21
- INIT_STRINGS = [
22
- "You are about to enter a rock-paper-scissors best of 3 match.",
23
- "Press the return/enter key to continue...",
24
- ""
25
- ];
13
+ INIT_STRINGS = ["You are about to enter a rock-paper-scissors best of 3 match.", "Press the return/enter key to continue...", ""];
26
14
  end;
27
15
 
28
16
  class RockPaperScissors
data/bin/rps CHANGED
@@ -5,24 +5,12 @@ class PlayRockPaperScissorsGame
5
5
  class RPS
6
6
 
7
7
  module Constants
8
- NTRY_TO_SYM = {
9
- 'p' => :PAPER,
10
- 'r' => :ROCK,
11
- 's' => :SCISSORS
12
- };
8
+ NTRY_TO_SYM = { 'p' => :PAPER, 'r' => :ROCK, 's' => :SCISSORS };
13
9
  VALID_ENTRIES = NTRY_TO_SYM.keys;
14
10
  COMPUTER_CHOICES = NTRY_TO_SYM.values;
15
- WINNERS = [
16
- [:SCISSORS, :PAPER],
17
- [:PAPER, :ROCK],
18
- [:ROCK, :SCISSORS]
19
- ]; # format: player choice, computer choice
11
+ WINNERS = [[:SCISSORS, :PAPER], [:PAPER, :ROCK], [:ROCK, :SCISSORS]]; # format: player choice, computer choice
20
12
  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
21
- INIT_STRINGS = [
22
- "You are about to enter a rock-paper-scissors best of 3 match.",
23
- "Press the return/enter key to continue...",
24
- ""
25
- ];
13
+ INIT_STRINGS = ["You are about to enter a rock-paper-scissors best of 3 match.", "Press the return/enter key to continue...", ""];
26
14
  end;
27
15
 
28
16
  class RockPaperScissors
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.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bag3318