I made a simple gambling game where you have to guess whether it will be a higher or lower number. You could probably do it in less lines of code than me and probably do it alot better. But I just put what I had just learn't into this..
Rem ******GAMBLING GAME******
Rem Created: 30/03/2009 22:05:07
Rem Project Leader: Jack Koval
Rem ***** Main Source File *****
`Variables
Money#=100
ink RGB(50,50,50),0
Box 0,0,450,150
ink RGB(0,255,0),0
Do
Start:
If Money#<=0
goto Wrong
Endif
Randomize Timer()
Num1=RND(12)
Num2=RND(12)
Num3=RND(12)
Num4=RND(12)
Num5=RND(12)
Money#=Money#+Win#
Text 200,100,"Your Money: "+str$(Money#)
Print "Hello and welcome to the game."
Print "The rules are simple..."
Print "It costs £20 to play"
Print "And if you win your total money is multiplyed by 2.5"
Print "Begin? Y/N?"
Repeat:
I$=Upper$(Inkey$()) :
Until I$="Y" or I$="N"
If I$="Y"
goto Number1
Else
End
Endif
Number1:
Money# = Money# - 20
CLS
Text 200,100,"Your Money: "+str$(Money#)
Print "Ok.. Number 1 is..."
wait 1500
Print
Print Num1
Print
Print "So will number 2 be <B>igger or <S>maller?"
Repeat:
I$=Upper$(Inkey$()) :
Until I$="B" or I$="S"
goto Number2
Number2:
CLS
Print Num1
Text 200,100,"Your Money: "+str$(Money#)
Print "Ok.. Number 2 is..."
wait 1500
Print
Print Num2
wait 2500
If Num2>=Num1 and I$="S"
goto Wrong
Endif
If Num2<Num1 and I$="S"
goto Number3
Endif
If Num2>=Num1 and I$="B"
goto Number3
Endif
If Num2<Num1 and I$="B"
goto Wrong
Endif
Number3:
CLS
Print Num2
Text 200,100,"Your Money: "+str$(Money#)
Print "So will number 3 be <B>igger or <S>maller?"
Repeat:
I$=Upper$(Inkey$()) :
Until I$="B" or I$="S"
Print
Print "Ok number three is..."
wait 1500
Print
Print Num3
wait 2500
If Num3>=Num2 and I$="S"
goto Wrong
Endif
If Num3<Num2 and I$="S"
goto Number4
Endif
If Num3>=Num2 and I$="B"
goto Number4
Endif
If Num3<Num2 and I$="B"
goto Wrong
Endif
Number4:
CLS
Print Num3
Text 200,100,"Your Money: "+str$(Money#)
Print "So will number 4 be <B>igger or <S>maller?"
Repeat:
I$=Upper$(Inkey$()) :
Until I$="B" or I$="S"
Print
Print "Ok number four is..."
wait 1500
Print
Print Num4
wait 2500
If Num4>=Num3 and I$="S"
goto Wrong
Endif
If Num4<Num3 and I$="S"
goto Number5
Endif
If Num4>=Num3 and I$="B"
goto Number5
Endif
If Num4<Num3 and I$="B"
goto Wrong
Endif
Number5:
CLS
Print Num4
Text 200,100,"Your Money: "+str$(Money#)
Print "So will number 5 be <B>igger or <S>maller?"
Repeat:
I$=Upper$(Inkey$()) :
Until I$="B" or I$="S"
Print
Print "Ok number five is..."
wait 1500
Print
Print Num5
wait 2500
If Num5>=Num4 and I$="S"
goto Wrong
Endif
If Num5<Num4 and I$="S"
goto Win
Endif
If Num5>=Num4 and I$="B"
goto Win
Endif
If Num5<Num4 and I$="B"
goto Wrong
Endif
Wrong:
CLS
Text 200,100,"Your Money: "+str$(Money#)
Print
Print "Sorry you were wrong or went bust...Would you like to play again? Y/N"
Repeat:
I$=Upper$(Inkey$()) :
Until I$="Y" or I$="N"
If I$="Y"
goto Start
Else
End
Endif
Win:
CLS
Text 200,100,"Your Money: "+str$(Money#)
Print
Win#=Money#*2.5
Print "Congratulations you won! Heres ";Win#;" Pounds!"
Wait 1000
Print "Play Again? Y/N"
Repeat:
I$=Upper$(Inkey$()) :
Until I$="Y" or I$="N"
If I$="Y"
goto Start
Else
End
Endif
Loop
TheCleverGuyz