Okay this is what I have with my game so far.
Everytime you get an answer right a box will come off the picture.
I only have 5 out of 16 questions writen, and only 1 programed into the thing.
I want to make it randomly spit out any of the 16 questions.
Also theres a glitch that when you type in what letter you think the answer is, it doesn't show until you press enter.
Can someone help?
Turing: |
var ch : string (1)
var Q1 : string
var lives : int := 3
var nums : array 1 .. 16 of int
var randNum: int
var store: int := 0
for i : 1 .. 16
nums (i ) := i
end for
for decreasing j : 16 .. 1
randint (randNum, 1, j )
store := nums (j )
nums (j ) := nums (randNum )
nums (randNum ) := store
end for
procedure box1
drawfillbox (0, 400, 130, 300, black)
end box1
procedure box2
drawfillbox (0, 300, 130, 200, black)
end box2
procedure box3
drawfillbox (0, 200, 130, 100, black)
end box3
procedure box4
drawfillbox (0, 0, 130, 100, black)
end box4
procedure box5
drawfillbox (130, 400, 230, 300, black)
end box5
procedure box6
drawfillbox (130, 300, 230, 200, black)
end box6
procedure box7
drawfillbox (130, 200, 230, 100, black)
end box7
procedure box8
drawfillbox (130, 0, 230, 100, black)
end box8
procedure box9
drawfillbox (230, 400, 330, 100, black)
end box9
procedure box10
drawfillbox (230, 300, 330, 300, black)
end box10
procedure box11
drawfillbox (230, 200, 330, 200, black)
end box11
procedure box12
drawfillbox (230, 0, 330, 100, black)
end box12
procedure box13
drawfillbox (330, 400, 430, 100, black)
end box13
procedure box14
drawfillbox (330, 300, 430, 300, black)
end box14
procedure box15
drawfillbox (330, 200, 430, 200, black)
end box15
procedure box16
drawfillbox (330, 0, 430, 100, black)
end box16
procedure
if nums (1) = 1 then
box1
end
put " "
put " >>-----------------------------xxInstructions-----<<"
put "In this game, you will be asked multiple questions about animals. Your job is to answer the questions by typing in the letter next to the answer you belive"
put "right. If you are wrong, you will lose a life. You only get three per game. If"
put "you are out of lives, it's game over! Once you answer a question right, a piece"
put "from a picture I drew will appear. Your goal is to uncover the whole picture!"
put "Press enter to start, and GOOD LUCK!"
getch(ch )
cls
setscreen ("offscreenonly")
Pic.ScreenLoad ("yesindeed.bmp", 0, 0, picCopy)
box1
box2
box3
box4
box5
box6
box7
box8
box9
box10
box11
box12
box13
box14
box15
box16
locate(1, 73)
put "Lives:", lives
locate(5, 57)
put "If you see an angler "
locate(6, 57)
put "fish, which gender can "
locate(7, 57)
put "you guarantee it will "
locate(8, 57)
put "be?"
locate(10, 58)
put "a]Male."
locate(11, 58)
put "b]Female."
locate(12, 58)
put "c]You can't guarantee."
locate(14, 70)
View.Update
get Q1
if Q1 = "b" then locate(16, 60)
put "Correct."
View.Update
delay(2500)
locate(16, 70)
cls
Pic.ScreenLoad ("yesindeed.bmp", 0, 0, picCopy)
box1
box2
box3
box4
box6
box7
box8
box9
box10
box11
box12
box13
box14
box15
box16
elsif Q1 = "a" or Q1 = "c" then lives:=lives- 1
locate(16, 60)
put "Nope, try again."
View.Update
delay(2500)
cls
end if
%Q2= What does the name platypus mean? {A.Broad Foot; OPT.1 Duck-Beaver, OPT.2 Poisonous Mammal}
%Q3= A foose is a: {A.Mongoose; OPT.1 Feline, OPT.2 Canine}
%Q4= What animal is closest to extinction? {A.Pinta Island Tortiose; OPT.1 Yangtze River Dolphin, OPT.2 Vancouver Island Marmot}
%Q5= A maltese tiger is; {A.Real; OPT.1 A Myth, OPT.2 Doesn't Exsist}
%Q6= Which of these animals have not ever been recorded seen in pygmy size? {A.Marlin; OPT.1 Hippo, OPT.2 Owl}
|
|