Projects

Mars Rover

I wrote the Mars Rover navigation game to demonstrate programming concepts for a recent career day presentation.

Mars RoverTo successfully navigate the Rover from the lower left square of the screen to the upper right corner of the screen write a program using the following simple commands:

  • R – Turn the Rover 90 degrees to the right.
  • L – Turn the Rover 90 degrees to the left.
  • M – Move one square in the direction that the Rover is currently facing.

Enter the program into the text window on the right of the screen using only the R, L, or M commands, e.g. “MMML” will move the rover three squares and then turn the Rover 90 degrees to the left. When you’re confident that you have the program ready, test it by clicking the “Transmit” button. If you reach the goal, the message “Mission Success” will be displayed, otherwise “Mission Failure” will appear. Click “Reset” to clear the program window and reset the Rover’s position so that you can try again.

As an added benefit, this game also helps to illustrate the concept of debugging, since you may not accomplish the mission on the first attempt.

The source code for this project is maintained on GitHub.

Snowflake

This is a JavaScript program that draws a snowflake using the HTML5 canvas element.

SnowflakeA step-by-step tutorial about how to develop this program is available here. The source code is also maintained on GitHub.