bin/99_game in 99_game-4.0.5.pre vs bin/99_game in 99_game-5.0.0
- old
+ new
@@ -4,11 +4,11 @@
BEGIN { # Looks at its arguements
ARGV[0] = "-h" if ARGV.first == "--help"
ARGV[0] = "-v" if ARGV[0] == "--version"
case ARGV[0]
when "-v"
- puts "3.2.2"
+ puts "5.0.0"
exit
when "-h"
puts "\u00B7 Commands"
puts "\t\u00b7 -v/--version - display version"
puts "\t\u00B7 -h/--help - shows this message\n"
@@ -35,28 +35,29 @@
sleep 2.5
}
$value, value1, value2, value3, dealer, user = 0,0,0,0, Hand.new, Hand.new
loop do
puts "\nIt's the dealer's turn!"
+
i, outcomes = 0, dealer.test_outcomes
if outcomes[0] >= outcomes[1] && outcomes[0] >= outcomes[2]
outcome = 0
elsif outcomes[1] >= outcomes[0] && outcomes[1] >= outcomes[2]
outcome = 1
else
outcome = 2
end
- pause 1.5
+ pause 1.4
puts "The dealer played #{dealer.play dealer.cards[outcome]}"
- pause(0.5)
+ pause(0.6)
puts "The value is now #{$value}\n"
- pause(1.5)
+ pause(1.75)
if $value > 99 # Runs when you win and exits loop
puts "You win!"
break
end
- puts "It's your turn!"
+ puts "\nIt's your turn!"
pause 1
user.view_cards
pause 0.5
puts "Pick a card to play by typing in the name of the card"
sleep 0.2
@@ -79,8 +80,9 @@
if $value > 99 # Runs when dealer wins and exits loop
puts "You lose..."
break
end
puts "You drew #{user.cards.last}"
+ pause 1.75
end
__END__
Programmed by: Zachary Perlmutter