During the fall semester of 2008, I worked as a tutor for Fundamentals of Computer Science. At the end of the course, the students wrote their own implementation of spacewar. When I took the course, we wrote tetris. So, I decided to give it a go, and the following is what I came up with:
I wrote this in scheme. Because we did not have an image rotate function, yet I still wanted to have triangular ships, I had to figure out the coordinates of all the three points of the ship, and then draw lines between them. The students used a big circle, with a smaller circle to represent the tip of the nose, as well as another one for a thruster, if it is on. Later, I added the control panel, as well as scoring and pausing.
You can view the source code here, and to play the game, just unzip this executable, at the moment, will only work on windows, but Dr.Scheme is available for all platforms, and you can then run the source code.