
-----------------------------------
dann_west
Tue Oct 04, 2005 12:29 pm

EXTREME GUESSING GAME!!!!!!(The Largest Guessing Game Ever!)
-----------------------------------
Most people give up before they beet this game! tell me if you beet it!
 :twisted:  :twisted:  :twisted:  :twisted:  :twisted:  :twisted:


i had trouble attaching so heres the code. I know some will say keep it simple stupid,but o well i was bored and i just typyed a lot.


%By Dann Westman
%Guessing Game
%September 21 2005

%display settings
setscreen ("graphics:300,300")
colourback (black)
colour (yellow)
cls

%variables
var num, num2, num3, num4, num5, num6, num7, num8, num9, num0, pick : int
var font, font2, points : int
num := Rand.Int (1, 50)
num2 := Rand.Int (1, 100)
num3 := Rand.Int (1, 500)
num4 := Rand.Int (1, 1000)
num5 := Rand.Int (1, 2000)
num6 := Rand.Int (1, 5000)
num7 := Rand.Int (1, 10000)
num8 := Rand.Int (1, 20000)
num9 := Rand.Int (1, 50000)
num0 := Rand.Int (1, 100000)
font := Font.New ("Arial:18:Bold")
font2 := Font.New ("Arial:10:Bold")
points := 100

%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"

-----------------------------------
beard0
Tue Oct 04, 2005 12:31 pm


-----------------------------------
I guess that you forgot to actually post it.
 He didn't have code there when i posted, I swear!

-----------------------------------
codemage
Tue Oct 04, 2005 12:45 pm


-----------------------------------
That's some very... uh... linear code you've got there.

You should invest some time in reading about Loops, here:
http://www.compsci.ca/v2/viewtopic.php?t=3678

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.)

-----------------------------------
Tony
Tue Oct 04, 2005 12:52 pm


-----------------------------------
loops and functions.

you're repeating way to much code.

-----------------------------------
Mazer
Tue Oct 04, 2005 2:42 pm


-----------------------------------
And you're assuming we'll have a picture of the Fonz on our computer. I assure you that I do not.

-----------------------------------
Darkshining
Tue Oct 04, 2005 7:20 pm


-----------------------------------
Yeah, too much unessasary repetition.
Use loops.
But, yeah, good effort, must have been very time consuming.

-----------------------------------
Darkshining
Tue Oct 04, 2005 7:41 pm


-----------------------------------
And may i add, i am the first oe to beat this guessing game.

-----------------------------------
[Gandalf]
Tue Oct 04, 2005 10:31 pm


-----------------------------------
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.

-----------------------------------
beard0
Tue Oct 04, 2005 10:44 pm


-----------------------------------
"]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... :lol:

-----------------------------------
dann_west
Wed Oct 05, 2005 1:09 pm


-----------------------------------
If you can try to tell me how to make the picture to appear on my program....i had som trouble with it.
 :twisted:  :twisted:  :twisted:  :twisted:  :twisted:  :twisted:  :twisted:

-----------------------------------
codemage
Wed Oct 05, 2005 1:14 pm


-----------------------------------
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
Wed Oct 05, 2005 1:21 pm


-----------------------------------
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
Wed Oct 05, 2005 4:09 pm


-----------------------------------
for a noob like me everything seems to be excellent

-----------------------------------
Darkshining
Wed Oct 05, 2005 4:21 pm


-----------------------------------
I'll second that!  My feeling is that Darkshining shouldn't really be proud of having sat through all those delays... :lol:

Don't feel sorry for me, i got rid of the delays before i played. I always read the code before i run it.  :lol:  8) 

i did run it with the delays once though.  :x  WAY to time consuming.[/quote]

-----------------------------------
StarGateSG-1
Wed Oct 05, 2005 9:05 pm


-----------------------------------
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 :?

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

Good luck with this.

-----------------------------------
[Gandalf]
Wed Oct 05, 2005 10:32 pm


-----------------------------------
http://img385.imageshack.us/img385/3065/win2zs.jpg

Guess I win :).

-----------------------------------
md
Wed Oct 05, 2005 10:37 pm


-----------------------------------
I would do that if I could re-write it in C or C++ or pascal (for which I have compilers), and if it told you if you were too high or two low. But that would make it rather trivial :P

-----------------------------------
beard0
Thu Oct 06, 2005 7:02 am


-----------------------------------
"]http://img385.imageshack.us/img385/3065/win2zs.jpg

Guess I win :).
If you're going to edit it, try to make it more realistic: There is no "pause" or "stop" button once execution has finished!   :wink:

-----------------------------------
[Gandalf]
Thu Oct 06, 2005 3:01 pm


-----------------------------------
*cough*better?*cough*
http://img305.imageshack.us/img305/2558/win6ku.jpg

Now I won...  :shifty:

-----------------------------------
beard0
Thu Oct 06, 2005 3:46 pm


-----------------------------------
"]*cough*better?*cough*
http://img305.imageshack.us/img305/2558/win6ku.jpg

Now I won...  :shifty:

Wow, that's amazing!  How'd you know that that's what it was?

Nice use of the shifty eyes :D

-----------------------------------
Tony
Fri Oct 07, 2005 7:59 am


-----------------------------------

Rand.Set (1)
if Rand.Int (1, 999999999) = 720446773 then
    put "haxor"
end if

 :twisted:

-----------------------------------
StarGateSG-1
Fri Oct 07, 2005 9:24 am


-----------------------------------
Nope Sorry Gandalf not luck for you, I should have been more clear I need to see all the source code i can't read what the Rand.Int max is.

Plus the chnace of getting that right is insane mainly becasue it resets everytime.

I don't think anyone could get that right and have all the source code running, included the the entire background of Windows.

-----------------------------------
[Gandalf]
Sat Oct 08, 2005 5:10 pm


-----------------------------------
Where is the trust? :)

http://img69.imageshack.us/img69/8391/win39ol.jpg

-----------------------------------
StarGateSG-1
Mon Oct 10, 2005 9:17 pm


-----------------------------------
The problem isn't trust, jst that unless you sit there for hours I dout you would get the number!

Please take another one without another turing window open. So just the program and the run window, even better I think i can post complied file now!

-----------------------------------
[Gandalf]
Mon Oct 10, 2005 9:29 pm


-----------------------------------
Pah... Give me a break, what could another Turing window do?  You see it is Unnamed #2, that's what the source file is, and that's all I'm going to be bothered to show.  Think about how hard it would be to guess the number for the third time would be.

I hope you get my point, if not, I will enlighten you later.

-----------------------------------
Tony
Tue Oct 11, 2005 7:40 am


-----------------------------------

View.Set ("title:Unnamed #2* - Turing")
put ""


-----------------------------------
goboenomo
Thu Oct 13, 2005 11:34 am


-----------------------------------
That's some very... uh... linear code you've got there.

You should invest some time in reading about Loops, here:

agreed u could cut that code so much smaller

The game: i find it a bit boring..
could put some more creative things into that..
didnt have to go all out with the background and colored letters

-----------------------------------
The_Triangle
Sat Nov 12, 2005 8:24 am


-----------------------------------
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 :?

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

Good luck with this.

can we make it say if its lower or higher than what our guess is?

-----------------------------------
Mr. T
Sat Nov 12, 2005 2:21 pm


-----------------------------------
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 :?

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

Good luck with this.

can we make it say if its lower or higher than what our guess is?
That would be pointless because you're recieving a new random number every time the loop cycles.

-----------------------------------
Clayton
Wed Jan 11, 2006 7:26 pm


-----------------------------------
uh, wow, uve got a lot of time on your hands i must say you probably could have shortened that by about 400 lines with some loops and procedures, but to his his own hope you had fun programming that
