Joystick position: Difference between revisions

Added BBC BASIC
m ({{omit from|Lilypond}})
(Added BBC BASIC)
Line 6:
 
For the purpose of this task, we assume that the joystick is calibrated and that the first joystick is being used. The task implementer could at their option provide a solution that includes a joystick selection facility, enabling the user to choose which joystick is to be used for this task.
 
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
<lang bbcbasic> VDU 23,22,512;512;8,8,16,0
OFF
GCOL 4,15
REPEAT
X% = ADVAL(1) / 64
Y% = 1023 - ADVAL(2) / 64
LINE X%-32,Y%,X%+32,Y% : LINE X%,Y%-32,X%,Y%+32
WAIT 2
LINE X%-32,Y%,X%+32,Y% : LINE X%,Y%-32,X%,Y%+32
UNTIL FALSE</lang>
 
=={{header|GUISS}}==