blackjack1 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/bin/blackjack1 +8 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzcwNjYyOThmZDljYTU4OTk2ZTNkMDIyNWY1M2E5M2NkZGE2NzQ3OA==
4
+ MmE4YjFmNGUyMGE4OTZhNzBhZjA2OWQyYzZmNjdlNTgzY2JkNmY3Zg==
5
5
  data.tar.gz: !binary |-
6
- ZWExZWNlYmUzNDA0ZDkyOTNiOGNmYjY5NGNlN2Q2YzMwNDU2YThmNA==
6
+ ZDVmNWMyYjJjZTJjOTg3Y2E5MzJjMTlmMTE4OWQyZDg1MTgxYzY0Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTg3MmMxZjAyNWY5Y2JmMjRlODYxMThlOTQ4M2IwMzdlZTczMTE4YzE1YWIz
10
- MjlmZDkzMDNjZWQzN2YwOGJkZjk1MGNmNDkzMGIxMWM4NDcyZjYzYWRhMjQy
11
- MGQ3NWIyN2VkZGJhYjdmZGZiNmIwNTdmM2YyMjZhZTUwMGI2NDI=
9
+ MmE5ZmE0YjE5Y2JlN2EwNWVlM2ZjODgyOGNmMjQwODk3MWVmMDY5ZTNmNzhl
10
+ MDk4YTE3NDIxZmI2MDUyMDI4ODYzNzhlNTRkZTA1ZWFkMzVlZDhhZTM3N2Jj
11
+ MWRjYTVmMDFkNTgxOGY0ODBmMWE5MTUwNDUzMDc5ZTc0MTJmNmI=
12
12
  data.tar.gz: !binary |-
13
- NmZiNTRkYzFjZjIzMmM3MjBiOGM5ZmRlOGU4NDc3MjRhYmRmMTY0MDdhYzhl
14
- Mjc3MWQxNzdlODg4ODA1NjNmNjVjY2YwZjFkNGY3ZDQyZjgxMjZlZjNkY2M3
15
- YjM5MThjZmE1ZTQ0ZWZjN2M3MmNlOGI5MWRiYjk3OTNlOTE4MjE=
13
+ OWI2MTA4MzY5YzVkYWU4ODVjOWRlZjEwZTA2YTE1ZDM3MzE4NjM1NzJmODgx
14
+ ZjY0MTUyMTc4YzQzMDllYmQ1MmQzOTZhMDk4NTBjYWUwZGVhMTA3ZWZjZDVj
15
+ OTM2NDdkOTNmYTQwZGRkZWMzZmU3OWY4ZjZjYWE3MGU4MGEwOTI=
data/bin/blackjack1 CHANGED
@@ -5,7 +5,7 @@ dealer, player, view = Hand.new, Hand.new, proc do |player|
5
5
  puts "You have: #{player.view}"
6
6
  sleep(0.5)
7
7
  puts "Value: #{player.value}"
8
- sleep 1
8
+ sleep(1)
9
9
  end
10
10
  view.call player
11
11
  unless player.blackjack?
@@ -13,7 +13,7 @@ unless player.blackjack?
13
13
  sleep 1
14
14
  loop do
15
15
  puts
16
- print view.call player
16
+ view.call player
17
17
  print "(h)it or (s)tay? "
18
18
  action = gets.chomp.downcase
19
19
  player.hit if action.include?("h")
@@ -23,32 +23,32 @@ unless player.blackjack?
23
23
  unless player.bust?
24
24
  puts "You finished with #{player.value}."
25
25
  else
26
- puts "You busted."
26
+ puts "You busted @ #{player.value}."
27
27
  end
28
28
  sleep 2
29
29
  if dealer.blackjack?
30
30
  puts "Dealer got blackjack."
31
- sleep 0.5
31
+ puts; sleep 0.5
32
32
  puts "Dealer wins."
33
33
  sleep 2
34
34
  exit
35
35
  end
36
36
  puts
37
37
  while dealer.value <= Hand::MDHV
38
- puts "The dealer hit!"
38
+ puts "The dealer hits!"
39
39
  dealer.hit
40
40
  sleep 0.5
41
41
  end
42
42
  puts
43
- if dealer.bust? then puts "The dealer busted!"
43
+ if dealer.bust? then puts "The dealer busted @ #{dealer.value}!"
44
44
  else
45
- puts "The dealer stays at #{dealer.value}"
45
+ puts "The dealer stays @ #{dealer.value}"
46
46
  end
47
47
  sleep 2
48
48
  puts compare_score player, dealer
49
49
  else
50
50
  puts "You got blackjack!"
51
- sleep 1
51
+ puts; sleep 1
52
52
  puts "You win!"
53
53
  sleep 0.5
54
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackjack1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Perlmutter