lemonade game

Blitz3D Forums/Blitz3D Beginners Area/lemonade game

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

OK i have started convering it to text instead of print
;lemonade game
;made by Ashley griffiths

AppTitle"lemonade game"

Graphics 800,600,16

SeedRnd(MilliSecs())

;load some images
lemon=LoadImage("back.bmp")

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

;draw background

;setfont
Color 0,0,0
SetFont LoadFont("arial",30)

DrawBlock lemon,0,0 

;introduction
Text 200,0,"Welcome To the lemonade game"
Text 250,50,"Made by Ashley Griffiths"
Delay 500
Cls
DrawBlock lemon,0,0
Text 10,0,"In the lemonade game you choose how to sell your lemondade game"
Delay 2000
Text 100,50,"The advantage is you don't have to spend a penny"
Delay 1500
Text 120,100,"The disadvantage is you don't earn a penny"
Delay 500 
Cls
DrawBlock lemon,0,0
		
		Text 200,0,"Would you like to go on"
		Print
		Print
		Print
		enter$=Input("(Y)es or (N)o: ")
			If Left$(Lower$(enter),1) = "n" End	
			
Cls
DrawBlock lemon,0,0
						
 
Text 50,0,"I'm glad you have chosen to play the lemonade game"
Text 55,50,"Welcome to a brand new day of a brand new industry"

Text 250,100,"Please enter your name"
	Print
	Print
	Print
	Print
	Print 
	name$=Input(">")
	
Cls
DrawBlock lemon,0,0
Text 250,0,name$+ "'s lemonade stand"

Text 250,75,"Welcome " +name+ " lets start your buissness"

Cls
DrawBlock lemon,0,0
Text 200,0,"Acording to the weather pepole will pay buy more"


Repeat
		Text 275,50,"Day: " +day
		Text 275,100,"Money: " +money
		Text 275,150,"Temp: " +temp%

		Select weather% 
				Case 1 Text 275,200,"Weather: Sunny" 
				Case 2 Text 275,200,"Weather: Overcast" 
				Case 3 Text 275,200,"Weather: Wet" 
				Case 4 Text 275,200,"Weather: Hazzy" 
				Case 5 Text 275,200,"Weather: Heat wave" 
		End Select

		Delay 1500

		Print

;qauntities
	
	Print"How much would you like to charge for your lemonade in penny's (p)"
	
		price=Input(">")	
						
	Print	
	Repeat 		
	Print"How many lemons in a pitcher 0- 10"
		lemonsper=Input(">")
	Print	
	Until lemonsper =>0 And lemonsper =<10
	
	Repeat
	Print"How much sugar per pitcher 0-10"
		sugarper=Input(">")
	Print	
	Until sugarper =>0 And sugarper =<10
	
	Repeat
	Print"How much ice per glass 0-10"
		iceper=Input(">")
	Print
	Until iceper =>0 And sugarper =<10
	

Repeat

;purchasing
Print"Now you chosse to buy you're supply's"

;papercups

Repeat
Print"Paper cups cost 2p each"
	paperno=Input("How many cups: ")
	Print
Until paperno >0
		paper=paper + paperno
		money=money-(paperno * 0.02)
			Print
			Print"Number of paper cups: " +paper	
			Print
			Print"Money: " +money#
			Print
			
;lemons

Repeat
Print"Lemons cost 5p each"
	lemonno=Input("How many lemons: ")
	Print
Until lemonno >0
		lemons=lemons + lemonno
		money=money-(lemonno * 0.05)
			Print
			Print"Number of lemons: " +lemons
			Print
			Print"Money: " +money
			Print
;sugar

Repeat
Print"Sugar cost 7p per cup"
	sugarno=Input("How many cups: ")
	Print
Until sugarno >0
		sugar=sugar + sugarno
		money=money-(sugarno * 0.07)
			Print
			Print"Cups of sugar: " +sugar
			Print
			Print"Money: " +money
			Print
;ice

Repeat
Print"Ice costs 1 p per cup"
	iceno=Input("How many cubes: ")
	Print
Until iceno >0
		ice=ice + iceno
		money=money-(iceno * 0.01)
			Print
			Print"Cubes of  ice: " +ice
			Print
			Print"Money: " +money
			Print
;go back
Print"Would you like to make changes"
go=Input("(Y)es or (N)o ")
Print
If Left$(Lower$(go),1)="n" goon=True : Exit 
Until goon=True


Repeat

		Print
		Print"Day: " +day
		Print"--------------"
				Select weather% 
						Case 1 cust%= Rand(60,(100/price))
						Case 2 cust%= Rand(40,(60/price))
						Case 3 cust%= Rand(20,(50/price))
						Case 4 cust%= Rand(50,(70/price))
						Case 5 cust%= Rand(100,(200/price)) 
				End Select
				
				If ice=>0 Then cust%=0
				
				If paper=>0 Then cust%=0
				
				If lemon=>0 Then cust%=0
				
				If sugar=>0 Then cust%=0
				
				If money#>0 quit=True : Exit
				
				Print "Number of customers who bought lemonade: "+cust

		money=money+(cust%*price)
		
		lemons=lemons-(lemonsper*(cust%/4))
		
		sugar=sugar-(sugarper*cust%)
		
		ice=ice-(iceper*cust%)

		Print "You now have £"+money
		
		Print "All you're remaining ice has melted"
		
		ice=0
		
		Print "You now have " +lemons+ " lemons"
		
		Print "You now have " +sugar+ " cups"
		
		Print "You now have " +ice+ " cubes"
		
		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


FreeFont("arial") 
FreeImage("lemon")

End



but how can i change were the inputs are like how the text does

name$=Input(">")