The 'up' and 'down' code follows. Up works, but down does not. They look exactly the same to me, so if anyone can tell me why down isn't working, I'd greatly appreciate it. I've run into the same problem when trying to use the 'right' key, too. I know I'm missing something really simple.
Map is a 20x12 array. I'll gladly post more code if needed. thanks in advance!
Code: Select all
IF k$ = "u" THEN
FOR y = 0 TO 11
FOR x = 0 TO 19
IF map(x, y) = 2 THEN
map(x, y) = 0
map(x, y - 1) = 2
END IF
NEXT x
NEXT y
END IF
IF k$ = "d" THEN
FOR y = 0 TO 11
FOR x = 0 TO 19
IF map(x, y) = 2 THEN
map(x, y) = 0
map(x, y + 1) = 2
END IF
NEXT x
NEXT y
END IF