Coin flip
Posted: Wed Jun 02, 2010 10:36 am
Hey in this one game im making for fun theres a coin flip in the begging but its not working. I coded it like this.
Code:
input "Heads or tails?(H or T)"; horts$
randomize timer
num = int(rnd * 2) + 1
if horts$ = "H" or horts$ = "h" then
d = 1
b = 0
end if
if horts$ = "t" or horts$ ="T" then
b = 1
d = 0
end if
if num = 1 then d = d + 1
if num = 2 then b = b + 1
if b = d then goto Himfirst
if d > b then goto youfirst
'then the actual game.
Code:
input "Heads or tails?(H or T)"; horts$
randomize timer
num = int(rnd * 2) + 1
if horts$ = "H" or horts$ = "h" then
d = 1
b = 0
end if
if horts$ = "t" or horts$ ="T" then
b = 1
d = 0
end if
if num = 1 then d = d + 1
if num = 2 then b = b + 1
if b = d then goto Himfirst
if d > b then goto youfirst
'then the actual game.