%title
for title : 1 .. 50
Font.Draw ("Extreme Guessing Game! ", 10, 150, font, title)
delay (100)
cls
end for
delay (1000)
%Author
Font.Draw ("By Dann Westman", 20, 150, font, 12)
delay (2000)
cls
%program loop(all the main components)
put "Welcome to EXTREME GUESSING GAME EXTREME!"
delay (2000)
cls
put
"You will be given 100 points to start. Each in correct answer will loose you a point. If your points reach zero,you loose."
delay (5000)
cls
Font.Draw ("Level One: Very Easy", 20, 150, font, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 50:" ..
get pick
cls
if pick = num then
put "yes thats it!"
elsif pick > num then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was ", num
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Two: Easy", 20, 150, font, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 100:" ..
get pick
cls
if pick = num2 then
put "yes thats it!"
elsif pick > num2 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num2 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num2 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was ", num2
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Three: Medium", 20, 150, font, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 500:" ..
get pick
cls
if pick = num3 then
put "yes thats it!"
elsif pick > num3 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num3 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num3 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was ", num3
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Four: Medium/Hard", 20, 150, font, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 1000:" ..
get pick
cls
if pick = num4 then
put "yes thats it!"
elsif pick > num4 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num4 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num4 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was ", num4
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Five:Hard", 20, 150, font, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 2000:" ..
get pick
cls
if pick = num5 then
put "yes thats it!"
elsif pick > num5 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num5 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num5 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was ", num5
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Six:Super Hard", 20, 150, font, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 5000:" ..
get pick
cls
if pick = num6 then
put "yes thats it!"
elsif pick > num6 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num6 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num6 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number happened to be ", num6
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Seven: Super Duper Hard", 20, 150, font, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 10 000:" ..
get pick
cls
if pick = num7 then
put "yes thats it!"
elsif pick > num7 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num7 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num7 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was the crazy number ", num7
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Eight: Very Super Duper Hard", 20, 150, font2, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 20000:" ..
get pick
cls
if pick = num8 then
put "yes thats it!"
elsif pick > num8 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num8 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num8 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was the unthinkable number ", num8
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (4000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Nine:Nearly Impossible", 20, 150, font, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 50000:" ..
get pick
cls
if pick = num9 then
put "yes thats it!"
elsif pick > num9 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num9 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num9 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was ", num9
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
Font.Draw ("Level Ten:So Hard The Fonz", 20, 150, font2, 12)
Font.Draw ("himself would have trouble!", 20, 100, font2, 12)
delay (2000)
cls
loop
put "Pick a number between 1 and 100000:" ..
get pick
cls
if pick = num0 then
put "yes thats it!"
elsif pick > num0 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "This time,Try a lower number."
elsif pick < num0 then
points := points - 1
put "No!"
put "You have ", points, " points left!"
delay (1100)
put "Try a higher number."
else
put "Try typing a real number dumby!"
end if
delay (2000)
cls
exit when (pick = num0 or points = 0)
end loop
if points = 0 then
put "HAHA sucker,you lose!"
put "The number was ", num0
Draw.FillOval (150, 150, 60, 60, yellow)
Draw.Line (120, 150, 140, 160, black)
Draw.Line (140, 150, 120, 160, black)
Draw.Line (180, 150, 160, 160, black)
Draw.Line (160, 150, 180, 160, black)
Draw.Line (110, 120, 180, 120, black)
delay (3000)
else
put "You Win!"
put "You are a real winner you crazy guy!"
Pic.ScreenLoad ("fonzie.jpg", 50, 50, picCopy)
delay (3000)
end if
cls
put "The End"
Sponsor Sponsor
beard0
Posted: Tue Oct 04, 2005 12:31 pm Post subject: (No subject)
I guess that you forgot to actually post it.
[Edit]: He didn't have code there when i posted, I swear!
codemage
Posted: Tue Oct 04, 2005 12:45 pm Post subject: (No subject)
That's some very... uh... linear code you've got there.
You'll gain the time back by not having to type so much. (Loops would make the majority of your code below unecessary, since you're basically doing the same thing 10 times.)[/url]
Tony
Posted: Tue Oct 04, 2005 12:52 pm Post subject: (No subject)
loops and functions.
you're repeating way to much code.
Mazer
Posted: Tue Oct 04, 2005 2:42 pm Post subject: (No subject)
And you're assuming we'll have a picture of the Fonz on our computer. I assure you that I do not.
Darkshining
Posted: Tue Oct 04, 2005 7:20 pm Post subject: (No subject)
Yeah, too much unessasary repetition.
Use loops.
But, yeah, good effort, must have been very time consuming.
Darkshining
Posted: Tue Oct 04, 2005 7:41 pm Post subject: (No subject)
And may i add, i am the first oe to beat this guessing game.
[Gandalf]
Posted: Tue Oct 04, 2005 10:31 pm Post subject: (No subject)
For your next game, if you want more people to play it (and beat it), make sure to get rid of the delays (delay()). It may seem like a good 'presentation' idea, but it is definately not neccessary and it takes away from the usability of your program.
Sponsor Sponsor
beard0
Posted: Tue Oct 04, 2005 10:44 pm Post subject: (No subject)
[Gandalf] wrote:
For your next game, if you want more people to play it (and beat it), make sure to get rid of the delays (delay()). It may seem like a good 'presentation' idea, but it is definately not neccessary and it takes away from the usability of your program.
I'll second that! My feeling is that Darkshining shouldn't really be proud of having sat through all those delays...
dann_west
Posted: Wed Oct 05, 2005 1:09 pm Post subject: (No subject)
If you can try to tell me how to make the picture to appear on my program....i had som trouble with it.
codemage
Posted: Wed Oct 05, 2005 1:14 pm Post subject: (No subject)
You would have to have the picture file, "fonzie.jpg", in this case, in the same directory of your turing file (or give a more specific reference to the file in the program.)
You also need to include the picture in any non-compiled package of the code if you want anyone else to be able to see it.
beard0
Posted: Wed Oct 05, 2005 1:21 pm Post subject: (No subject)
codemage wrote:
You also need to include the picture in any non-compiled package of the code if you want anyone else to be able to see it.
You need to include it for any package, compiled or not.
nmr123321
Posted: Wed Oct 05, 2005 4:09 pm Post subject: (No subject)
for a noob like me everything seems to be excellent
Darkshining
Posted: Wed Oct 05, 2005 4:21 pm Post subject: (No subject)
Quote:
I'll second that! My feeling is that Darkshining shouldn't really be proud of having sat through all those delays...
Don't feel sorry for me, i got rid of the delays before i played. I always read the code before i run it. 8)
i did run it with the delays once though. WAY to time consuming.[/quote]
StarGateSG-1
Posted: Wed Oct 05, 2005 9:05 pm Post subject: (No subject)
Not to be a bum, but he is making false claims.
Try this out.
+20 bits to the person who beats this, I want a screenshot.
Edit, not working, give me a minute
Well I guess i will have to give the source code, this is wierd it can't upload the file
code:
var Num_Answer : int
var Num_Guess : int
loop
Num_Answer := Rand.Int(1,999999999)
put "Please enter any number between 1 and 999999999"
get Num_Guess
if Num_Guess = Num_Answer then
put "Congradulations, you beat the longest guessing game ever"
exit when Num_Guess = Num_Answer
else
put "Nope try again"
end if
end loop