Table of Contents
Mastermind is a code-breaking game traditionally played by two players, with one being the "codemaker" and the other the "codebreaker."
In this version of the game, the player plays as the codebreaker trying to guess a code that has been randomized by the program. The code consists of four colors selected from six possible colors, where duplicates are possible. The player has 12 turns to guess the code before they lose.
Once a player makes a guess, a miniature board ("miniboard") will display colors indicate how accurate their guess was. A green circle indicates a correct color in the correct position. A yellow circle indicates a correct color but in the incorrect position. A red circle indicates no match. The miniboard does not necessarily confirm the order of the guess.
- HTML
- CSS
- JavaScript
You can play the game by clicking here!
Feel free to submit a pull request if you would like to suggest any changes.
- Add a color-blind option
- Hide the game instructions in a modal that opens upon click
- Add an animated background and/or other style enhancements; refactor for accessibility and responsiveness
- Allow the player to submit a code to be cracked with an algorithm
- A great README.md template
- CSS Animation Library
- CSS Buttons (and other)
- CSS Flexbox Guide (just because it's always helpful!)
- Accessible Colors