Hello,
I am trying to make a simple drawing program. This program should, in theory, have a 1 pixel cursor, and move around the graph screen using the arrow keys. It should place a pixel when you press 2nd, and remove it when you press Del.
However, instead, it makes a single pixel which just moves around the screen, and no keys do anything (except the on key, of course (well, not "of course" if you have onblock)).
The code is here:
Code:
It's probably a silly mistake. Can you please help me find it?
Thanks!
I am trying to make a simple drawing program. This program should, in theory, have a 1 pixel cursor, and move around the graph screen using the arrow keys. It should place a pixel when you press 2nd, and remove it when you press Del.
However, instead, it makes a single pixel which just moves around the screen, and no keys do anything (except the on key, of course (well, not "of course" if you have onblock)).
The code is here:
Code:
ClrDraw
Pxl-On(1,1)
Pxl-Off(1,1)
1→A
1→B
1→C
1→D
1→E
Repeat 0
getKey→K
If K=21
1→E
If K=23
0→E
If K=24
B-1→B
If K=26
B+1→B
If K=25
A-1→A
If K=34
A+1→A
If E=1
Then
Pxl-On(C,D)
Pxl-On(A,B)
Else
If A≠C≠D
Then
Pxl-Off(C,D)
Pxl-On(A,B)
End
End
A→C
B→D
0→E
EndIt's probably a silly mistake. Can you please help me find it?
Thanks!










