# igrkart2
clr
gs 'stat'
set minut += 5
if turn1 = 0:
cla
''
' Please give me your bets, gentlemen.'
act 'IPod':
deal = input 'Enter the amount'
if money < deal:
msg 'You have enough money'
gt 'igrkart2'
end
if deal < 0:
msg 'Wrong, try again.'
gt 'igrkart1'
end
if deal > 1000:
msg 'The maximum rate of 1000 rubles.'
gt 'igrkart1'
end
set money -= deal
turn1 = 1
gt 'igrkart2'
end
act 'Move away from the table':gt 'kazvar'
end
if turn1 = 1:
cla
''
nich = 0
act 'Put another draw':
if money < deal:
msg 'You have enough money'
turn1 = 2
nich = 0
gt 'igrkart2'
end
set money -= deal
turn1 = 2
nich = 1
gt 'igrkart2'
end
act 'Continue without an additional rate':
turn1 = 2
nich = 0
gt 'igrkart2'
end
end
if turn1 = 2:
cla
''
' The dealer deals the cards:'
'...'
suit = rand(1, 4)
number = rand(1, 13)
$di_card[1] = $number[number] + $suit[suit]
di_points = points[number]
di_poi = number
suit = rand(1, 4)
number = rand(2, 14)
$pl_card[1] = $number[number] + $suit[suit]
pl_points = points[number]
pl_poi = number
wait 1000
'Map of dealer:'
' <<$di_card[1]>>'
'__________________________'
'Player Maps:'
' <<$pl_card[1]>>'
if di_poi > pl_poi:
' '
'Casinos won'
act 'You lost':
turn1 = 0
gt 'igrkart2'
end
end
if di_poi < pl_poi:
' '
'You won'
act 'You have won (<<2 * deal>> rubles)':
set money += 2 * deal
turn1 = 0
gt 'igrkart2'
end
end
if di_poi = pl_poi:
if nich = 1:
' '
'You won'
act 'You have won (<<11 * deal>> rubles)':
set money += 11 * deal
turn1 = 0
gt 'igrkart2'
end
else
turn1 = 3
gt 'igrkart2'
end
end
end
if turn1 = 3:
act 'Continue to play':
if money < deal:
msg 'You have enough money'
gt 'igrkart2'
end
set money -= deal
cla
''
' The dealer deals the cards:'
'...'
suit = rand(1, 4)
number = rand(1, 13)
$di_card[2] = $number[number] + $suit[suit]
di_points = points[number]
di_poi = number
suit = rand(1, 4)
number = rand(2, 14)
$pl_card[2] = $number[number] + $suit[suit]
pl_points = points[number]
pl_poi = number
wait 1000
'Map of dealer:'
' <<$di_card[1]>>'
' <<$di_card[2]>>'
'__________________________'
'Player Maps:'
' <<$pl_card[1]>>'
' <<$pl_card[2]>>'
if di_poi > pl_poi:
' '
'Casinos won'
act 'You lost':
turn1 = 0
gt 'igrkart2'
end
end
if di_poi < pl_poi:
' '
'You won'
act 'You have won (<<4 * deal>> rubles)':
set money += 4 * deal
turn1 = 0
gt 'igrkart2'
end
end
if di_poi = pl_poi:
' '
'Again draw'
act 'Pick up (<<3 * deal>> rubles)':
set money += 3 * deal
turn1 = 0
gt 'igrkart2'
end
end
end
act 'Pick up half your bet':
if deal mod 2 = 1:deal = deal + 1
set money += deal/2
gt 'igrkart2'
end
end
--- igrkart2 ---------------------------------