lemonade game

Blitz3D Forums/Blitz3D Beginners Area/lemonade game

Ashley .. try this:

; Lemonade game
; Made by Ashley griffiths

AppTitle"Lemonade Game"

;; Graphics 800,600,16
SeedRnd(MilliSecs())

;some variables
day = 1
money# = 20.00
price#=0
temp%= Rand(1,10)   ; temp random
weather%= Rand(1,5) ; Weather random
paper=0 : lemons=0 : sugar=0 : ice=0
quit=False

;introduction
Print "Welcome to the lemonade game."+Chr$(10)
Delay 500
Print "In the lemonade game you choose how to sell your lemondade."
Delay 5000
Print "The advantage is you don't have to spend a penny."
Delay 1500
Print "The disadvantage is you don't earn a penny."
Delay 500 
Print "Would you like to go on?"+Chr$(10)
enter$=Input("(Y)es or (N)o: ")
If Left$(Lower$(enter),1)="n" End

Print ""
Print "I'm glad you have chosen to play the lemonade game."
Print "Welcome to a brand new day of a brand new industry."+Chr$(10)
Print "please enter your name:"
name$=Input$(">")
Print ""
Print name$+ " lemonade stand."+Chr$(10)
Print "Welcome. Lets start your business."
Print "According to the weather people will pay more and buy more."

Repeat
	Print ""
	Print "Day " +day
	Print "Money " +money
	Print "Temp " +temp
	Select weather
		Case 1 : Print "Weather: Sunny" 
		Case 2 : Print "Weather: Overcast" 
		Case 3 : Print "Weather: Wet" 
		Case 4 : Print "Weather: Hazzy" 
		Case 5 : Print "Weather: Heat wave" 
	End Select
	Delay 1500
	Print ""

	.loop
	;quantities
	price=Input$("How much would you like to charge for your lemonade? > ")
	lemons=Input$("How many lemons in a pitcher? > ")
	sugar=Input$("How much sugar per pitcher? > ")
	ice=Input$("How much ice per glass? > ")
	Print ""
	;purchasing
	Print "Now you choose to buy you're supply's"
	;papercups
	paperno=Input$("Paper cups cost 2p each. How many cups? > ")
	paper=paper+paperno
	money=money-(Float(paperno)*0.02)
	Print "number of paper cups: " +paper
	Print "money: " +money
	;lemons
	lemonno=Input$("Lemons cost 5p each. How many lemons? > ")
	lemons=lemons+lemonno
	money=money-(Float(lemonno)*0.05)
	Print "number of lemons: " +lemons
	Print "money: " +money
	;sugar
	sugarno=Input$("Sugar costs 7p per cup. How many cups? > ")
	sugar=sugar+sugarno
	money=money-(Float(sugarno)*0.07)
	Print "Cups of sugar: " +sugar
	Print "money: " +money
	;ice
	iceno=Input$("Ice costs 1 p per cup. How many cubes? > ")
	ice=ice+iceno
	money=money-(Float(iceno)*0.01)
	Print "Cubes of ice: "+ice
	Print "money: " +money
	
	Repeat
		Print " "
		Print "Day "+day
		Print "-----------"
		
		Select weather% 
			Case 1 : cust%= Rand(60,100)
			Case 2 : cust%= Rand(40,60)
			Case 3 : cust%= Rand(20,50)
			Case 4 : cust%= Rand(50,70)
			Case 5 : cust%= Rand(100,200) 
		End Select
		
		Print "Number of customers who bought lemonade: "+cust
		money=money+(cust%*price)
		Print "You now have "+money+Chr$(10)
		Print"Would you like to make changes?"
		choice$=Input$("(Y)es / (N)o  / (Q)uit game   > ")
		If Left$(Lower$(choice),1)="y" Print "" : Exit
		If Left$(Lower$(choice),1)="q" quit=True : Exit
		day=day+1 : If day=30 quit=True : Exit
	Forever
	
Until quit=True

End