'Author: Jamie Randle'
'Cookie Clicker in Small Basic'
'================================================'
'TO DO LIST'
'================================================'
'Add upgrades which change cookies per click and CpS'
'================================================'
'NEXT'
'Button where you can sell buildings next to buy buttons OR insert images for the cookie and possibly the buildings'
'Sets up the graphics window'
Sub GraphicsWindowSetup
GraphicsWindow.Title = "Click the button"
GraphicsWindow.CanResize = "True"
GraphicsWindow.Height = 780
GraphicsWindow.Width = 1360
EndSub
'Sets up the cookie'
Sub CookieSetup
Cookie = Controls.AddButton("Click Me", 555, 225)
Controls.SetSize(Cookie, 250, 250)
EndSub
'Sets up the images'
'Sub ImageSetup
' CookieImage = ImageList.LoadImage("C:\Users\Jammy\Desktop\Small Basic Programs\Cookie Clicker\Images\Cookie.jpg")
' GraphicsWindow.DrawImage(CookieImage, 555, 255)
'EndSub
'Sets up the scoring'
Sub ScoreSetup
ScoreText = Controls.AddTextBox(10,10)
Score = 0
Controls.SetTextBoxText(ScoreText, "Cookies = " + Score)
Controls.SetSize(ScoreText, 250, 25)
EndSub
'Sets up the CpS'
Sub CpSSetup
CpSText = Controls.AddTextBox(10,40)
CpS = 0
Controls.SetTextBoxText(CpSText, "CpS = " + CpS)
Controls.SetSize(CpSText, 250, 25)
EndSub
'Sets up the CpS timer
Sub CpSTimerSetup
Timer.Interval = 1000 'One tick per second'
Timer.Tick = CpSTimerTick
EndSub
'Makes the timer do something every time it ticks'
Sub CpSTimerTick
Score = Score + CpS
Controls.SetTextBoxText(ScoreText, "Cookies = " + Score)
EndSub
'Displays the amount of cursors the player has'
Sub CursorNumberSetup
CursorNumberText = Controls.AddTextBox(10,70)
Controls.SetTextBoxText(CursorNumberText, "Number of cursors = " + CursorNumber)
Controls.SetSize(CursorNumberText, 250, 25)
EndSub
'Displays the amount of grandmas the player has'
Sub GrandmaNumberSetup
GrandmaNumberText = Controls.AddTextBox(10,100)
Controls.SetTextBoxText(GrandmaNumberText, "Number of grandmas = " + GrandmaNumber)
Controls.SetSize(GrandmaNumberText, 250, 25)
EndSub
'Displays the amount of farms the player has'
Sub FarmNumberSetup
FarmNumberText = Controls.AddTextBox(10,130)
Controls.SetTextBoxText(FarmNumberText, "Number of farms = " + FarmNumber)
Controls.SetSize(FarmNumberText, 250, 25)
EndSub
'Displays the amount of factories the player has'
Sub FactoryNumberSetup
FactoryNumberText = Controls.AddTextBox(10,160)
Controls.SetTextBoxText(FactoryNumberText, "Number of factories = " + FactoryNumber)
Controls.SetSize(FactoryNumberText, 250, 25)
EndSub
'Displays the amount of mines the player has'
Sub MineNumberSetup
MineNumberText = Controls.AddTextBox(10,190)
Controls.SetTextBoxText(MineNumberText, "Number of mines = " + MineNumber)
Controls.SetSize(MineNumberText, 250, 25)
EndSub
'Displays the amount of shipments the player has'
Sub ShipmentNumberSetup
ShipmentNumberText = Controls.AddTextBox(10,220)
Controls.SetTextBoxText(ShipmentNumberText, "Number of shipments = " + ShipmentNumber)
Controls.SetSize(ShipmentNumberText, 250, 25)
EndSub
'Displays the amount of alchemy labs the player has'
Sub AlchemyLabNumberSetup
AlchemyLabNumberText = Controls.AddTextBox(10,250)
Controls.SetTextBoxText(AlchemyLabNumberText, "Number of alchemy labs = " + AlchemyLabNumber)
Controls.SetSize(AlchemyLabNumberText, 250, 25)
EndSub
'Displays the amount of portals the player has'
Sub PortalNumberSetup
PortalNumberText = Controls.AddTextBox(10,280)
Controls.SetTextBoxText(PortalNumberText, "Number of portals = " + PortalNumber)
Controls.SetSize(PortalNumberText, 250, 25)
EndSub
'Displays the amount of time machines the player has'
Sub TimeMachineNumberSetup
TimeMachineNumberText = Controls.AddTextBox(10,310)
Controls.SetTextBoxText(TimeMachineNumberText, "Number of time machines = " + TimeMachineNumber)
Controls.SetSize(TimeMachineNumberText, 250, 25)
EndSub
'Displays the amount of antimatter condensers the player has'
Sub AntimatterCondenserNumberSetup
AntimatterCondenserNumberText = Controls.AddTextBox(10,340)
Controls.SetTextBoxText(AntimatterCondenserNumberText, "Number of antimatter condensers = " + AntimatterCondenserNumber)
Controls.SetSize(AntimatterCondenserNumberText, 250, 25)
EndSub
'Displays the amount of prisms the player has'
Sub PrismNumberSetup
PrismNumberText = Controls.AddTextBox(10,370)
Controls.SetTextBoxText(PrismNumberText, "Number of prisms = " + PrismNumber)
Controls.SetSize(PrismNumberText, 250, 25)
EndSub
'Sets up the cursors'
Sub CursorSetup
BuyCursor = Controls.AddButton("Buy a cursor", 1150, 10)
Controls.SetSize(BuyCursor, 200, 35)
CursorPrice = 15
CursorNumber = 0
EndSub
'Sets up the grandmas'
Sub GrandmaSetup
BuyGrandma = Controls.AddButton("Buy a grandma", 1150, 50)
Controls.SetSize(BuyGrandma, 200, 35)
GrandmaPrice = 100
GrandmaNumber = 0
EndSub
'Sets up the farms'
Sub FarmSetup
BuyFarm = Controls.AddButton("Buy a Farm", 1150, 90)
Controls.SetSize(BuyFarm, 200, 35)
FarmPrice = 500
FarmNumber = 0
EndSub
'Sets up the factories'
Sub FactorySetup
BuyFactory = Controls.AddButton("Buy a Factory", 1150, 130)
Controls.SetSize(BuyFactory, 200, 35)
FactoryPrice = 3000
FactoryNumber = 0
EndSub
'Sets up the mines'
Sub MineSetup
BuyMine = Controls.AddButton("Buy a Mine", 1150, 170)
Controls.SetSize(BuyMine, 200, 35)
MinePrice = 10000
MineNumber = 0
EndSub
'Sets up the shipments'
Sub ShipmentSetup
BuyShipment = Controls.AddButton("Buy a Shipment", 1150, 210)
Controls.SetSize(BuyShipment, 200, 35)
ShipmentPrice = 40000
ShipmentNumber = 0
EndSub
'Sets up the alchemy labs'
Sub AlchemyLabSetup
BuyAlchemyLab = Controls.AddButton("Buy an Alchemy Lab", 1150, 250)
Controls.SetSize(BuyAlchemyLab, 200, 35)
AlchemyLabPrice = 200000
AlchemyLabNumber = 0
EndSub
'Sets up the portals'
Sub PortalSetup
BuyPortal = Controls.AddButton("Buy a Portal", 1150, 290)
Controls.SetSize(BuyPortal, 200, 35)
PortalPrice = 1677000
PortalNumber = 0
EndSub
'Sets up the time machines'
Sub TimeMachineSetup
BuyTimeMachine = Controls.AddButton("Buy a Time Machine", 1150, 330)
Controls.SetSize(BuyTimeMachine, 200, 35)
TimeMachinePrice = 123456789
TimeMachineNumber = 0
EndSub
'Sets up the antimatter condensers'
Sub AntimatterCondenserSetup
BuyAntimatterCondenser = Controls.AddButton("Buy an Antimatter Condenser", 1150, 370)
Controls.SetSize(BuyAntimatterCondenser, 200, 35)
AntimatterCondenserPrice = 4000000000
AntimatterCondenserNumber = 0
EndSub
'Sets up the prisms'
Sub PrismSetup
BuyPrism = Controls.AddButton("Buy a Prism", 1150, 410)
Controls.SetSize(BuyPrism, 200, 35)
PrismPrice = 75000000000
PrismNumber = 0
EndSub