This is my version of mastermind game. It works on IPC SysV message queue.
git clone https://github.com/guzlewski/mastermind
cd mastermind
make
If your terminal doesn't support colors:
make nocolor
./server.out [KEY]
then
./client.out [KEY] [NICK]
KEY has to be integer, it is id for message queue.
NICK is string - player name.
./server.out 1
./client.out 1 Player
One player creates puzzle (4 numbers 1-6) and other tries to solve in 12 attempts.
If player hit correct number in correct place in result is 2, if correct color in wrong plase result is 1, otherwise 0.
That means we hit number 2, number 5 is in pattern but on other place, 2 and 6 aren't in pattern.
Copyright (c) Michał Guźlewski. All rights reserved.