Selaa lähdekoodia

Fixed issue where no money was being taken for bet ans allowing you to bet if you had no money when playing Black Jack..

Ekay 8 vuotta sitten
vanhempi
commit
85de73190a
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6 2
      locations/igrkart1

+ 6 - 2
locations/igrkart1

@@ -11,12 +11,16 @@ if turn = 0:
 	' Please give me your bets, gentlemen.'
 
 	act 'Make a bet':
-		money -= deal
+		if money <= 0:
+			'You don''t have enough money to place a bet.'
+			act 'Move away from the table':gt 'bldzh'
+		end
 		turn = 1
 		deal = input 'Enter the amount'
 
-		if money < deal:
+		if money >= deal:
 			msg 'You have enough money'
+			money -= deal
 			gt 'igrkart1'
 		elseif deal < 0:
 			msg 'Wrong, try again.'