/MasterMind

MasterMind colors guessing game implemented in Smalltalk and C++

Primary LanguageSmalltalk

MasterMind

MasterMind is a simple color guessing game, here implemented in Smalltalk for Pharo 6.1 and in C++ for the Ubuntu terminal. Not tested on other distributions.

Instructions

The rules of the game are as follows:

  1. You have to guess the combination of five non repeating colors between red, green, blue, yellow, white, black, magenta and brown.

  1. The response symbol ⬢ means one color is in the combination at the right place, while ⬡ means a color is in the combination, but at the wrong place.

  1. You have 12 attempts. If you've not guessed the right combination by then, you will lose.

How to compile and execute the game

Save the source code file MasterMind.cc in a folder on your computer. Open a terminal and navigate to you folder with the command cd, then run the commands

g++ MasterMind.cc -std=c++0x -o MasterMind

and

./MasterMind