Click the right arrow to rotate to the right. Click the left arrow to rotate to the left. Press the spacebar for thrust. Exercise to the student: add asteroids! Shoot them!
Flip across the edges by positiveX to negativeX and Y. Calculate the change in velocity by sin and cos of the direction.