rowanmcau
March 30th, 2006, 06:43
would someone be able to degug my code
i think something is wrong with my random number thing
DRAW = Image.load("PICS/DRAW.JPG")
WIN = Image.load("PICS/WIN.JPG")
LOSE = Image.load("PICS/LOSE.JPG")
while true do
screen:clear()
pad = Controls.read()
-- X
if pad:cross() then
break
end
a = math.random(3)
if a == 1 then
screen:blit(0,0,WIN)
end
if a == 2 then
screen:blit(0,0,LOSE)
end
if a == 3 then
screen:blit(0,0,DRAW)
end
screen.waitVblankStart()
screen.flip()
end
thx
i think something is wrong with my random number thing
DRAW = Image.load("PICS/DRAW.JPG")
WIN = Image.load("PICS/WIN.JPG")
LOSE = Image.load("PICS/LOSE.JPG")
while true do
screen:clear()
pad = Controls.read()
-- X
if pad:cross() then
break
end
a = math.random(3)
if a == 1 then
screen:blit(0,0,WIN)
end
if a == 2 then
screen:blit(0,0,LOSE)
end
if a == 3 then
screen:blit(0,0,DRAW)
end
screen.waitVblankStart()
screen.flip()
end
thx