99_game 1.1.1 → 1.2.0

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/99_game +17 -31
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13720a122ce8ebffb38c060c9228ccea30028517
4
- data.tar.gz: eba51913c37700021ca4a82985bd3c6e5b849a38
3
+ metadata.gz: b33ed45d745995561b4ab1e80407dd6df0c51046
4
+ data.tar.gz: f35c309b83e5eba9af1500670cb3192dfc46802c
5
5
  SHA512:
6
- metadata.gz: dc71fcfac8b00818eb4599c6892036d0bd5b14de1a07376a3bf8ac48e28c715d10630ad7b534b513c41bbfd9eaeaea66ded4b762a12b5f20abe24383ac1f2beb
7
- data.tar.gz: 53aaed704fa72257340a34bfcc5e22b419bcacffd3094ec2b5f45aace1d60e9f6b06e1f4c3b4f9757375b2818712b20caf55493b55de18ba14bba969fbe55318
6
+ metadata.gz: 935784af3788d3e7b61bc62ce48b1b1acd470e2875d15a6bf06ab34165d4bdf6d318b7cb735d7f7cbbe11b3a958c1e20bc4876f7a6e2260d0e5e23cb00e85e2e
7
+ data.tar.gz: 9d433ba8190343bb7e01d0d739dbf786318f7c391627db609697999c5a4c00ed0db22c0d598b9fa2d62b8b54fff4a0ffd8a57f587b2e07fc2dfe88af93e3dcc5
data/bin/99_game CHANGED
@@ -1,36 +1,22 @@
1
1
  #!/usr/bin/env ruby
2
2
  require '99_game'
3
- BEGIN { # Rules of the game
4
- puts "\n\t\t\t\tThe Game Of 99\n\t\t\t\t--------------\n\n"
5
- sleep(1)
6
- print "\tWould you like to see the rules? (y/n) => "
7
- begin
8
- if gets.chomp.include?("y")
9
- puts
10
- puts "\tGoal: Your goal is to get your opponent to bring the value over 99 by\nplaying 1 of your 3 cards."
11
- sleep(3); puts
12
- puts "\tCards: A card will usually increase the value by itself, but there are a few exceptions."
13
- sleep(3); puts
14
- puts "\t\tValues"
15
- puts "\t\t------"
16
- sleep(1)
17
- puts "\n\t\u00B7 Aces are worth 1"
18
- sleep(3)
19
- puts "\t\u00B7 1 - 10 are worth themselves, with the exception of 4 and 9"
20
- sleep(3)
21
- puts "\t\u00B7 4, 9, and Jacks are worth 0"
22
- sleep(3)
23
- puts "\t\u00B7 Queens decrease the value by 10"
24
- sleep(3)
25
- puts "\t\u00B7 Kings set the value to 99"
26
- sleep(3)
27
- puts "\t\u00B7 Jokers set the value to 0"
28
- sleep(3); puts
29
- print "Press Enter to begin"; gets.chomp
30
- else; sleep(2)
31
- end
32
- rescue Exception; puts "Continuing"
33
- end
3
+ BEGIN { # Looks at its arguements
4
+ ARGV[0] = "-h" if ARGV[0] == "--help"
5
+ case ARGV[0]
6
+ when "-h"
7
+ puts "\u00B7 Commands"
8
+ puts "\t\u00B7 -h/--help - shows this message\n"
9
+ puts "\u00B7 Gameplay"
10
+ puts "\t\u00B7 Your goal is to get your opponent to bring the value over 99 by playing 1 of your 3 cards."
11
+ puts "\t\u00B7 A card will usually increase the value by itself, but there are a few exceptions:"
12
+ puts "\t\t\u00B7 Aces are worth 1"
13
+ puts "\t\t\u00B7 1 - 10 are worth themselves, with the exception of 4 and 9"
14
+ puts "\t\t\u00B7 4, 9, and Jacks are worth 0"
15
+ puts "\t\t\u00B7 Queens decrease the value by 10"
16
+ puts "\t\t\u00B7 Kings set the value to 99"
17
+ puts "\t\t\u00B7 Jokers set the value to 0"
18
+ exit
19
+ end
34
20
  puts
35
21
  puts
36
22
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 99_game
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Perlmutter