Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 YO TURING prORGRAM THAT WONT BUDGE
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jafa12




PostPosted: Wed Jun 01, 2005 12:08 am   Post subject: YO TURING prORGRAM THAT WONT BUDGE

the result menu wont work













setscreen ("graphics")
Pic.Draw (Pic.FileNew ("picture1 (Small).jpg"), 0, 0, picCopy) % blackish background
put " click to continue"
var infoback : int := Pic.FileNew ("wall3.JPG")
var infoback2 : int := Pic.FileNew ("wall4.JPG")
var wall5 : int := Pic.FileNew ("wall5.JPG")
var wall6 : int := Pic.FileNew ("wall6.JPG")
var click : boolean
var button : int
var x, y : int
var ret : int
var quizanswer : string
var backmmainpage : string (1)
var total : int
var JobwellDone : int
var ok : int
var continue : string (1)
var NI : int
var Fail : int
var counter : int
var font1, font2, font3, font4 : int
var choice : string
var finished : boolean := false
total := 0
JobwellDone := 3
ok := 2
NI := 1
Fail := 0
counter := 0
click := false
font4 := Font.New ("Palatino:16:bold,italic")
assert font4 > 0
procedure getKey
var ch : char
ch := getchar
end getKey
process DoMusic
loop
exit when finished
Music.PlayFile ("01 - Snoop Dogg feat. The Doors - Riders on the Storm (Fredwreck Remix).mp3")
end loop
end DoMusic

fork DoMusic

loop
mousewhere (x, y, button)
if button = 1 then
cls
end if
exit when button = 1
end loop
loop
Pic.Draw (Pic.FileNew ("needforspeed_u6.jpg"), 0, 0, picCopy)
Font.Draw ("Need for Speed ", 255, 350, font4, white)
Font.Draw ("Underground 2", 250, 325, font4, white)
Font.Draw ("1. Information", 20, 20, font4, white)
Font.Draw ("2. Quiz", 180, 20, font4, white)
Font.Draw ("3. Results", 290, 20, font4, white)
Font.Draw ("4. Movie", 420, 20, font4, white)
Font.Draw ("5. Exit", 550, 20, font4, white)
locatexy (15, 50)
put "Enter your choice(1-5) " ..

colour (brightred)
get choice
%
if choice = "1" then
cls
locate (1, 25)
colour (red)
put "Cars in Need for speed Underground 2"
colour (black)
put "2004 Audi A3 and Audi TT"
put "2003 Volkswagen Golf GTI"
put "2004 Cadillac Escalade"
put "2003 Acura RSX Type S"
put "2003 Ford Focus ZX3 and 2005 Ford Mustang GT"
put "2004 Hummer H2"
put "2004 Subaru WRX STI"
put "2004 Pontiac GTO"
put "2003 Toyota Celica GT-S, 1987 Toyota Corolla GTS and 1998 Toyota Supra"
put "1999 Mitsubishi 3000 GT, Mitsubishi Eclipse GSX and 2003 Mitsubishi Lancer EVO"
put "2003 Hyundai Tiburon GT"
put "2002 Lexus iS300"
put "1999 Mazda Miata, MX51995 Mazda and RX-72004 Mazda RX-8"
put "2000 Honda Civic Coupe Si"
put "1992 Nissan 240sx, 2003 Nissan 350Z, Nissan Sentra Spec and 1999 Nissan Skyline"
put "2004 Lincoln Navigator"
put "2003 Peugeot 206 GTI"

put "2004 Infiniti G35"
put " "
locate (25, 1)
put "To go back to the menu please enter any key..." ..
Pic.Draw (infoback, 0, 0, picUnderMerge)
getKey
cls
%Next Page
locate (1, 25)
colour (red)
put "About Need for Speed Underground 2"
put "Need for Speed underground 2 is often known as NFS Underground 2. This game has won the best-selling racing game of 2003." ..
put "The game allows the user to free-roaming the city to find their own races. They added three new races, circuit, " ..
put "drift and drag. In every race that the user wins he or she gain money. Then the user is able to customize their car" ..
put " with the money that they have gain from the races that they won. You're able to tune every aspect of the cars performance." ..
put " There is over 70 billion car combination that can't be made. Also there are over 30 cars to choose from. With an online mode " ..
put "you're able to play people from around the world. Opel/Vauxhall Corsa and Peugeot 106 are not in the North American version. " ..
put "Riders on the Storm (Fredwreck Remix)by Snoop Dogg ft. The Doors is the Need for Speed Underground Officail theme song"
colour (black)
locate (25, 1)

Pic.Draw (infoback2, 0, 0, picUnderMerge)
put "Please enter a key to continue..." ..
getch (continue)
cls
elsif choice = "2" then
cls
colour (14)
locate (10, 20)
put "Please take note that this program is case sensitive"
locate (11, 25)
put " This is how you are going to be marked:"
locate (12, 13)
put " To get 1 point you must get the answer on thrird try"
locate (13, 13)
put " To get 2 points you must get the answer on second try"
locate (14, 13)
put " To get 3 points you must get the answer on first try"

Pic.Draw (wall5, 0, 0, picUnderMerge)

Input.Pause

colour (black)


cls
Pic.Draw (wall6, 0, 0, picUnderMerge)
put " What year is the Hummer H2 in NFS" ..
get quizanswer : *
if quizanswer = "2004" then
total := total + JobwellDone

put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "2004" then
counter := counter + 1
put "Sorry that was a wrong answer!"
put "Please try again!"
get quizanswer : *
end if
if quizanswer = "2004" and counter = 1 then
put " WOW it look that you study, Good job"
delay (2000)
total := total + ok
elsif quizanswer not= "2004" and counter = 1 then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Please try again!"
get quizanswer : *
if quizanswer = "2004" and counter = 2 then
put "Not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put "Sorry it is wrong!Better luck next time"
delay (2000)
total := total + Fail
end if
end if
Pic.Draw (wall6, 0, 0, picUnderMerge)

cls
Pic.Draw (wall6, 0, 0, picUnderMerge)

put "How many car combination is there?" ..
get quizanswer : *
if quizanswer = "Over 70 billion" then
total := total + JobwellDone
put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "Over 70 billion" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer : *
end if
if quizanswer = "Over 70 billion" and counter = 1 then
put "Good Job!!!"
delay (2000)
total := total + ok
elsif quizanswer not= "Over 70 billion" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Please try again!"
get quizanswer : *
if quizanswer = "Over 70 billion" and counter = 2 then
put "not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put " Sorry your answer is wrong"
delay (2000)
total := total + Fail
end if
end if


cls
Pic.Draw (wall6, 0, 0, picUnderMerge)

put "Need for Speed underground 2 is often known as? " ..
get quizanswer : *
if quizanswer = "NFS Underground 2" then
total := total + JobwellDone
put "JobwellDone!!!"
put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "NFS Underground 2" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer
if quizanswer = "NFS Underground 2" and counter = 1 then
put "Good Job!!!"
delay (2000)
total := total + ok
elsif quizanswer not= "NFS Underground 2" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try!"
get quizanswer
end if
if quizanswer = "NFS Underground 2" and counter = 2 then
put "That is not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put "Try checking out the infomation section"
delay (2000)
total := total + Fail
end if
end if
cls
Pic.Draw (wall6, 0, 0, picUnderMerge)

put "What year did NFS Underground 2 was awarded for best-selling racing game" ..
get quizanswer
if quizanswer = "2003" then
total := total + JobwellDone
put "JobwellDone!!!"
put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "2003" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer
if quizanswer = "2003" and counter = 1 then
put "Good Job!!!"
delay (2000)
total := total + ok
elsif quizanswer not= "2003" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer
end if
if quizanswer = "2003" and counter = 2 then
put "Not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put "Sorry there isnt another try, better luck next time"
delay (2000)
total := total + Fail
end if
end if
cls
Pic.Draw (wall6, 0, 0, picUnderMerge)

put "What model of the Peugeot is not in the North American version " ..
get quizanswer : *
if quizanswer = "106" then
total := total + JobwellDone
put "JobwellDone!!!"
put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "106" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "I have hope in you try again"
get quizanswer : *
if quizanswer = "Port-au-Prince" and counter = 1 then
put "Good Job !!"
delay (2000)
total := total + ok
elsif quizanswer not= "106" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer : *
end if
if quizanswer = "106" and counter = 2 then
put "Not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put "study, Study, STUDY next time"
delay (2000)
total := total + Fail
cls
end if

end if
elsif choice = "3" then
cls
colour (black)
locate (1, 50)
put "Your total is ", total, " out of 30"
put skip

if total = 5 then
locate (12, 40)
locate (12, 40)
put "Wow you did a good job"
elsif total = 4 then
locate (12, 40)

put "Not bad"
elsif total= 3 then
locate (12, 40)

put "Not to shabby"
elsif total= 2 then
locate (12, 40)

put "Not bad"
put "Spend some more time studying"
elsif total= 1 then
locate (12, 40)

put "Not good enough, try puting some more effort"
elsif total=0 then
locate (12, 40)

put "study Study STudy STUdy STUDy STUDY STUDY!!!!!!!!!!1"
else

locate (12, 40)

put " You should try checking out the infomation page"
put ""
locate (1, 1)
put "To go back to the main page enter any key..."
%
getKey

cls
end if
elsif choice = "4" then
cls


var variable : int := Pic.FileNew ("untitled (Small)2.bmp")
var scenary : int := Pic.FileNew ("scenary2.bmp")

var x1 : int := 0
var x2 : int := 0
var x3 : int := 0
var x4 : int := 50
loop
exit when x1 = 500
setscreen ("offscreenonly")
cls
Pic.Draw (scenary, x3, x2, picCopy)
x1 := x1 + 1
Pic.Draw (variable, x1, x4, picMerge)
Draw.FillBox (maxx - 700, maxy - 160, maxx, maxy,blue)

View.Update
delay (1)
end loop
setscreen ("nooffscreenonly")

elsif choice = "5" then
Music.PlayFileStop
finished := true
cls
exit
end if
exit when hasch
end loop
setscreen ("graphics")
Pic.Draw (Pic.FileNew ("picture1 (Small).jpg"), 0, 0, picCopy) % blackish background
put " click to continue"
var infoback : int := Pic.FileNew ("wall3.JPG")
var infoback2 : int := Pic.FileNew ("wall4.JPG")
var wall5 : int := Pic.FileNew ("wall5.JPG")
var wall6 : int := Pic.FileNew ("wall6.JPG")
var click : boolean
var button : int
var x, y : int
var ret : int
var quizanswer : string
var backmmainpage : string (1)
var total : int
var JobwellDone : int
var ok : int
var continue : string (1)
var NI : int
var Fail : int
var counter : int
var font1, font2, font3, font4 : int
var choice : string
var finished : boolean := false
total := 0
JobwellDone := 3
ok := 2
NI := 1
Fail := 0
counter := 0
click := false
font4 := Font.New ("Palatino:16:bold,italic")
assert font4 > 0
procedure getKey
var ch : char
ch := getchar
end getKey
process DoMusic
loop
exit when finished
Music.PlayFile ("01 - Snoop Dogg feat. The Doors - Riders on the Storm (Fredwreck Remix).mp3")
end loop
end DoMusic

fork DoMusic

loop
mousewhere (x, y, button)
if button = 1 then
cls
end if
exit when button = 1
end loop
loop
Pic.Draw (Pic.FileNew ("needforspeed_u6.jpg"), 0, 0, picCopy)
Font.Draw ("Need for Speed ", 255, 350, font4, white)
Font.Draw ("Underground 2", 250, 325, font4, white)
Font.Draw ("1. Information", 20, 20, font4, white)
Font.Draw ("2. Quiz", 180, 20, font4, white)
Font.Draw ("3. Results", 290, 20, font4, white)
Font.Draw ("4. Movie", 420, 20, font4, white)
Font.Draw ("5. Exit", 550, 20, font4, white)
locatexy (15, 50)
put "Enter your choice(1-5) " ..

colour (brightred)
get choice
%
if choice = "1" then
cls
locate (1, 25)
colour (red)
put "Cars in Need for speed Underground 2"
colour (black)
put "2004 Audi A3 and Audi TT"
put "2003 Volkswagen Golf GTI"
put "2004 Cadillac Escalade"
put "2003 Acura RSX Type S"
put "2003 Ford Focus ZX3 and 2005 Ford Mustang GT"
put "2004 Hummer H2"
put "2004 Subaru WRX STI"
put "2004 Pontiac GTO"
put "2003 Toyota Celica GT-S, 1987 Toyota Corolla GTS and 1998 Toyota Supra"
put "1999 Mitsubishi 3000 GT, Mitsubishi Eclipse GSX and 2003 Mitsubishi Lancer EVO"
put "2003 Hyundai Tiburon GT"
put "2002 Lexus iS300"
put "1999 Mazda Miata, MX51995 Mazda and RX-72004 Mazda RX-8"
put "2000 Honda Civic Coupe Si"
put "1992 Nissan 240sx, 2003 Nissan 350Z, Nissan Sentra Spec and 1999 Nissan Skyline"
put "2004 Lincoln Navigator"
put "2003 Peugeot 206 GTI"

put "2004 Infiniti G35"
put " "
locate (25, 1)
put "To go back to the menu please enter any key..." ..
Pic.Draw (infoback, 0, 0, picUnderMerge)
getKey
cls
%Next Page
locate (1, 25)
colour (red)
put "About Need for Speed Underground 2"
put "Need for Speed underground 2 is often known as NFS Underground 2. This game has won the best-selling racing game of 2003." ..
put "The game allows the user to free-roaming the city to find their own races. They added three new races, circuit, " ..
put "drift and drag. In every race that the user wins he or she gain money. Then the user is able to customize their car" ..
put " with the money that they have gain from the races that they won. You're able to tune every aspect of the cars performance." ..
put " There is over 70 billion car combination that can't be made. Also there are over 30 cars to choose from. With an online mode " ..
put "you're able to play people from around the world. Opel/Vauxhall Corsa and Peugeot 106 are not in the North American version. " ..
put "Riders on the Storm (Fredwreck Remix)by Snoop Dogg ft. The Doors is the Need for Speed Underground Officail theme song"
colour (black)
locate (25, 1)

Pic.Draw (infoback2, 0, 0, picUnderMerge)
put "Please enter a key to continue..." ..
getch (continue)
cls
elsif choice = "2" then
cls
colour (14)
locate (10, 20)
put "Please take note that this program is case sensitive"
locate (11, 25)
put " This is how you are going to be marked:"
locate (12, 13)
put " To get 1 point you must get the answer on thrird try"
locate (13, 13)
put " To get 2 points you must get the answer on second try"
locate (14, 13)
put " To get 3 points you must get the answer on first try"

Pic.Draw (wall5, 0, 0, picUnderMerge)

Input.Pause

colour (black)


cls
Pic.Draw (wall6, 0, 0, picUnderMerge)
put " What year is the Hummer H2 in NFS" ..
get quizanswer : *
if quizanswer = "2004" then
total := total + JobwellDone

put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "2004" then
counter := counter + 1
put "Sorry that was a wrong answer!"
put "Please try again!"
get quizanswer : *
end if
if quizanswer = "2004" and counter = 1 then
put " WOW it look that you study, Good job"
delay (2000)
total := total + ok
elsif quizanswer not= "2004" and counter = 1 then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Please try again!"
get quizanswer : *
if quizanswer = "2004" and counter = 2 then
put "Not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put "Sorry it is wrong!Better luck next time"
delay (2000)
total := total + Fail
end if
end if
Pic.Draw (wall6, 0, 0, picUnderMerge)

cls
Pic.Draw (wall6, 0, 0, picUnderMerge)

put "How many car combination is there?" ..
get quizanswer : *
if quizanswer = "Over 70 billion" then
total := total + JobwellDone
put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "Over 70 billion" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer : *
end if
if quizanswer = "Over 70 billion" and counter = 1 then
put "Good Job!!!"
delay (2000)
total := total + ok
elsif quizanswer not= "Over 70 billion" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Please try again!"
get quizanswer : *
if quizanswer = "Over 70 billion" and counter = 2 then
put "not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put " Sorry your answer is wrong"
delay (2000)
total := total + Fail
end if
end if


cls
Pic.Draw (wall6, 0, 0, picUnderMerge)

put "Need for Speed underground 2 is often known as? " ..
get quizanswer : *
if quizanswer = "NFS Underground 2" then
total := total + JobwellDone
put "JobwellDone!!!"
put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "NFS Underground 2" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer
if quizanswer = "NFS Underground 2" and counter = 1 then
put "Good Job!!!"
delay (2000)
total := total + ok
elsif quizanswer not= "NFS Underground 2" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try!"
get quizanswer
end if
if quizanswer = "NFS Underground 2" and counter = 2 then
put "That is not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put "Try checking out the infomation section"
delay (2000)
total := total + Fail
end if
end if
cls
Pic.Draw (wall6, 0, 0, picUnderMerge)

put "What year did NFS Underground 2 was awarded for best-selling racing game" ..
get quizanswer
if quizanswer = "2003" then
total := total + JobwellDone
put "JobwellDone!!!"
put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "2003" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer
if quizanswer = "2003" and counter = 1 then
put "Good Job!!!"
delay (2000)
total := total + ok
elsif quizanswer not= "2003" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer
end if
if quizanswer = "2003" and counter = 2 then
put "Not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put "Sorry there isnt another try, better luck next time"
delay (2000)
total := total + Fail
end if
end if
cls
Pic.Draw (wall6, 0, 0, picUnderMerge)

put "What model of the Peugeot is not in the North American version " ..
get quizanswer : *
if quizanswer = "106" then
total := total + JobwellDone
put "JobwellDone!!!"
put "You Should be proud about yourself"

delay (2000)
elsif quizanswer not= "106" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "I have hope in you try again"
get quizanswer : *
if quizanswer = "Port-au-Prince" and counter = 1 then
put "Good Job !!"
delay (2000)
total := total + ok
elsif quizanswer not= "106" then
counter := counter + 1
put "Sorry that was a wrong answer"
put "Have another try"
get quizanswer : *
end if
if quizanswer = "106" and counter = 2 then
put "Not bad"
delay (2000)
total := total + NI
else
counter := counter + 1
put "study, Study, STUDY next time"
delay (2000)
total := total + Fail
cls
end if

end if
elsif choice = "3" then
cls
colour (black)
locate (1, 50)
put "Your total is ", total, " out of 30"
put skip

if total = 5 then
locate (12, 40)
locate (12, 40)
put "Wow you did a good job"
elsif total = 4 then
locate (12, 40)

put "Not bad"
elsif total= 3 then
locate (12, 40)

put "Not to shabby"
elsif total= 2 then
locate (12, 40)

put "Not bad"
put "Spend some more time studying"
elsif total= 1 then
locate (12, 40)

put "Not good enough, try puting some more effort"
elsif total=0 then
locate (12, 40)

put "study Study STudy STUdy STUDy STUDY STUDY!!!!!!!!!!1"
else

locate (12, 40)

put " You should try checking out the infomation page"
put ""
locate (1, 1)
put "To go back to the main page enter any key..."
%
getKey

cls
end if
elsif choice = "4" then
cls


var variable : int := Pic.FileNew ("untitled (Small)2.bmp")
var scenary : int := Pic.FileNew ("scenary2.bmp")

var x1 : int := 0
var x2 : int := 0
var x3 : int := 0
var x4 : int := 50
loop
exit when x1 = 500
setscreen ("offscreenonly")
cls
Pic.Draw (scenary, x3, x2, picCopy)
x1 := x1 + 1
Pic.Draw (variable, x1, x4, picMerge)
Draw.FillBox (maxx - 700, maxy - 160, maxx, maxy,blue)

View.Update
delay (1)
end loop
setscreen ("nooffscreenonly")

elsif choice = "5" then
Music.PlayFileStop
finished := true
cls
exit
end if
exit when hasch
end loop
Sad Sad
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: