Code Breaker

Try it out!

Code Breaker was originally designed and thought up back in my freshman year of high school. When it was initially made, I used Visual Basic and didn’t know much about the language or programming in general. I didn’t know any form of recursion or even what a loop was. This forced me to write every digit of the number pad 4 separate times, individually coding each to update the correct number on the display. The project took the entire 10-month school year. When it was complete the code was thousands of lines long and when moved to a word document, it sprawled across 28 pages in a tiny 8 size font. After high school, I lost access to the game and all its files. This prompted me to recreate the game.

The second time around I knew what I wanted to do and how to do it. I focused almost all my attention on optimization and design. My goal was to recreate the game but cut down the code as much as possible. The project took a total of 5 hours over 2 days to recreate without a web builder, which would have shortened the process even more. The code is approximately 600 lines total and works much more efficiently than the original game. I also designed the game to match my favorite color, red, using Bulma classes which saved me time, since I didn’t have to work on any CSS. The game also features a canvas that draws a sine wave that increases in frequency each time the player guesses incorrectly. This project was incredibly fun to make and recreate based on the memory I had of the original game I made about 7 years prior.

If you’d like to test out the checking system, the generated answer is printed to the console for debugging purposes.

Share:

Facebook
Twitter
LinkedIn
Email