
-----------------------------------
Lyla
Sat Jan 16, 2010 6:26 pm

I Need Help With My Quiz Game
-----------------------------------
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?



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-----