Mastermind

Games

About this app

Crack the hidden color code in 10 tries, built with pure React (no game engine). Wooden board with colored pegs. How to play The computer hides a code of colored pegs. Tap a color to fill the next hole in your row; tap a peg in your row to remove it. When the row is full, press Check. The pins next to it show: ● dark pin — a right color in the right spot ○ white pin — a right color in the wrong spot Pins are not in peg order. Use them to work out the code within 10 tries.

Features

  • Six colors (red, blue, green, yellow, white, black). Each peg also shows a letter (R, B, G, Y, W, K), so colors aren't the only cue.
  • Code length: 4, 5 or 6 pegs.
  • Allow repeated colors: a toggle for codes (and guesses) with repeated colors.
  • Changing a setting starts a new game.
  • Stats: games played, games won and average tries per win, saved in localStorage. The Stats dialog adds win rate and fewest tries, with Reset stats after a Yes / No confirmation.
  • Sound effects made with the Web Audio API (placing and removing pegs, a tick for each feedback pin, win and loss), with a 🔊 toggle.
  • Settings: theme (same as the device, light or dark), the code length and repeated colors a new session starts with, and sound on or off, all saved in localStorage.

This application can

Show its own pages, and nothing more

Ratings and reviews

0.0
0 review(s)
Only registered users can write reviews