
This is my Mastermind game written in Python and rendered entirely with vector graphics code using the Pygame library. This was an assignment for an intro game programming class in college, and is one of my favorite projects I did in school.
I spent most of my time in the class learning how to use all of the primitive draw functions. My professor anticipated us using sprites to draw the game board, so when I turned in the project he noted that I was missing my sprite files in my project directory. I asked him to try running it anyways and watched all the skepticism vanish when the game started up spriteless.
The entire game is drawn with vector graphics, using nothing but lines, boxes, and circles. No sprites or graphics tools were used at all, and the rotating shapes are all generated mathematically based on a unit circle. I going for a sort of sci-fi radar look, which I think came out pretty well.
The game code is available here if you want to try and run it. It uses Python 2.7 and Pygame 1.9.1.
Your goal is to figure out the correct sequence of 4 shapes. Use left/right arrows on the keyboard to change your shape, and space to guess that shape in the selected box. Guessing a shape will automatically move you to the next box for guessing. After placing 4 shapes in a row, you are given solid circles for each correct shape in the correct spot, and hollow circles for correct shapes in an incorrect spot.