Computer Science Canada With insane level-Robbie |
Author: | upthescale [ Wed Feb 01, 2006 12:28 am ] |
Post subject: | With insane level-Robbie |
colorback (7) put "" put "" put "" put "" put "" put "" put "" put "" put "" put "" put "" put "" put "" put "" put "" colorback (54) put "" put "" put "" put "" put "" put "" put "" put "" put "" put "" put "" var answer : string var number, guess, chancesLeft, font, x, y, button : int var ch : string (1) %%Variables font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Easy", 58, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Medium", 260, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Hard", 540, 220, font, red) font := Font.New ("chiller:40") assert font > 0 Font.Draw ("Insane", 300, 355, font, red) loop loop mousewhere (x, y, button) %Insane drawfillbox (228, 350, 466, 304, 63) %Insane %Hard% drawfillbox (510, 200, 680, 34, 63) %Hard %Medium% drawfillbox (270, 200, 430, 34, 63) %Medium% %Easy% drawfillbox (200, 200, 34, 34, 63) %Easy% %%%%%%%Medium if x > 270 and x < 430 and y > 34 and y < 200 and button = 1 then cls chancesLeft := 4 randint (number, 1, 50) color (87) put "Pick a number between 1-50...You have 4 chances" loop get guess cls if guess > number then color (87) put "You are to high!" delay (1200) cls chancesLeft := chancesLeft - 1 color (87) put "You have ", chancesLeft, " chances left" elsif guess < number then color (87) put "You are to low!" delay (1200) cls chancesLeft := chancesLeft - 1 color (87) put "You have ", chancesLeft, " chances left" elsif guess = number then color (87) put "You are correct!" delay (1200) cls exit end if if chancesLeft = 0 then color (87) put "You have no more guesses, the number was, ", number delay (4300) cls end if exit when chancesLeft = 0 end loop font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Easy", 58, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Medium", 260, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Hard", 540, 220, font, red) font := Font.New ("chiller:40") assert font > 0 Font.Draw ("Insane", 300, 355, font, red) %%%%%%%%Easy elsif x > 34 and x < 200 and y > 34 and y < 200 and button = 1 then cls chancesLeft := 4 randint (number, 1, 20) color (87) put "Pick a number between 1-20...You have 4 chances" loop get guess cls if guess > number then color (87) put "You are to high!" delay (1200) cls chancesLeft := chancesLeft - 1 color (87) put "You have ", chancesLeft, " chances left" elsif guess < number then color (87) put "You are to low!" delay (1200) cls chancesLeft := chancesLeft - 1 color (87) put "You have ", chancesLeft, " chances left" elsif guess = number then color (87) put "You are correct!" delay (1200) cls exit end if if chancesLeft = 0 then color (87) put "You have no more guesses, the number was, ", number delay (4300) cls end if exit when chancesLeft = 0 end loop font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Easy", 58, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Medium", 260, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Hard", 540, 220, font, red) font := Font.New ("chiller:40") assert font > 0 Font.Draw ("Insane", 300, 355, font, red) %%%%%%%%Hard elsif x > 510 and x < 680 and y > 34 and y < 200 and button = 1 then cls chancesLeft := 5 randint (number, 1, 100) color (87) put "Pick a number between 1-100...You have 5 chances" loop get guess cls if guess > number then put "You are to high!" delay (1200) cls chancesLeft := chancesLeft - 1 color (87) put "You have ", chancesLeft, " chances left" elsif guess < number then color (87) put "You are to low!" delay (1200) cls chancesLeft := chancesLeft - 1 color (87) put "You have ", chancesLeft, " chances left" elsif guess = number then color (87) put "You are correct!" delay (1200) cls exit end if if chancesLeft = 0 then color (87) put "You have no more guesses, the number was, ", number delay (4300) cls end if exit when chancesLeft = 0 end loop font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Easy", 58, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Medium", 260, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Hard", 540, 220, font, red) font := Font.New ("chiller:40") assert font > 0 Font.Draw ("Insane", 300, 355, font, red) %%%%%%%%Insane elsif x > 228 and x < 466 and y > 304 and y < 350 and button = 1 then cls chancesLeft := 7 randint (number, 1, 1000) color (87) put "You have entered the insane mode! (Hit a key to continue)" getch (ch) cls color (87) put "You can always turn back by hitting the q on your keyboard for Quit! (Hit a key to continue)" getch (ch) cls color (87) put "What will it be?" put "" put "" color (87) put "Quit- q" color (87) put "Continue- type in Enter" get answer cls if answer = "q" or answer = "Q" then color (87) put "I thought so!" delay (1000) break else end if color (87) put "Pick a number between 1-1000...You have 7 chances" loop get guess cls if guess > number then color (87) put "You are to high!" delay (1200) cls chancesLeft := chancesLeft - 1 color (87) put "You have ", chancesLeft, " chances left" elsif guess < number then color (87) put "You are to low!" delay (1200) cls chancesLeft := chancesLeft - 1 color (87) put "You have ", chancesLeft, " chances left" elsif guess = number then color (87) put "Amazingly done!!" delay (1200) cls exit end if if chancesLeft = 0 then color (87) put "You have no more guesses, the number was, ", number delay (4300) cls color (87) put "Never will you beat insane mode!" delay (3300) cls end if exit when chancesLeft = 0 end loop font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Easy", 58, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Medium", 260, 220, font, red) font := Font.New ("chiller:60") assert font > 0 Font.Draw ("Hard", 540, 220, font, red) font := Font.New ("chiller:40") assert font > 0 Font.Draw ("Insane", 300, 355, font, red) end if end loop exit end loop %By Robbie Comeau %circa_appleyard707@hotmail.com |