blackjack1 0.0.6 → 0.1.2
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 +8 -8
- data/bin/blackjack1 +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTlhMzdjZDc5MmUxZmY5YzBmYzk0Mjc2ZTBkMzc2NzQ2ODhhNjZhMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjZiNmNkMDRmYThjMDAxNDNiYmIxNTcxMTllMzMyM2RlMjcwOWNiZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWFiYjA4NmEwMWZkZjEyMDMyOWY1ZTNhYWIwZDMzZmJlNDVkMmQ5OWFlMzg3
|
10
|
+
NGMzZmY5ZDA3OWJjNGRkNzQxNmNlNDA2NGI1YTBhN2M0Y2ZhZjk3ZGIyZWM1
|
11
|
+
YjQ3MzU0ZTEyOTRlNTZiYzI1OGI1N2NhYzg2YzNjMjJmMTU4MDM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGI4M2E1NDViNTlhODQxN2M2NGYwNGU2MDdlZTlmYzk3YjE3N2UwN2MwMmU3
|
14
|
+
MzUyM2VjZDQ4Nzg2NWUzZmI1YzI1Mzg4MmMwNTNkYmRlODdlZGJhNzVlMTk3
|
15
|
+
OGZkMjA2ZjcwNzk2Nzg1YjQ0ODgyNDgxNmU0YWZmYTI2YmU3NmM=
|
data/bin/blackjack1
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
BEGIN {
|
3
|
+
helpmessage = <<HELP
|
4
|
+
\u00B7Goals:
|
5
|
+
\u00B7Beat the dealer by having your value be greater than his, without going over 21 and busting.
|
6
|
+
\u00B7Get blackjack by having your starting hand have a value of 21.
|
7
|
+
\u00B7Values:
|
8
|
+
\u00B7Ace => 1 or 11
|
9
|
+
\u00B7Number => itself
|
10
|
+
\u00B7King, Queen, Jack => 10
|
11
|
+
HELP
|
12
|
+
if ARGV[0].class == String
|
13
|
+
puts helpmessage if ARGV[0].include? "-h"
|
14
|
+
end
|
15
|
+
}
|
2
16
|
require "blackjack1"
|
3
17
|
Hand.deck, inputerror = CardDeck::Deck.new, "Invalid input. Please input '(h)it' or '(s)tay'"
|
4
18
|
dealer, player, view = Hand.new, Hand.new, proc do |player|
|