Skip to content

Custom simplified version of mastermind game written in C using IPC

Notifications You must be signed in to change notification settings

guzlewski/mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mastermind

This is my version of mastermind game. It works on IPC SysV message queue.

Compilation

git clone https://github.com/guzlewski/mastermind
cd mastermind
make

If your terminal doesn't support colors: make nocolor

Usage

./server.out [KEY]
then
./client.out [KEY] [NICK]

KEY has to be integer, it is id for message queue.
NICK is string - player name.

Example

./server.out 1
./client.out 1 Player

Image

How to play

One player creates puzzle (4 numbers 1-6) and other tries to solve in 12 attempts. Game creating
If player hit correct number in correct place in result is 2, if correct color in wrong plase result is 1, otherwise 0. Playing game
That means we hit number 2, number 5 is in pattern but on other place, 2 and 6 aren't in pattern. Won game

License

Copyright (c) Michał Guźlewski. All rights reserved.

About

Custom simplified version of mastermind game written in C using IPC

Topics

Resources

Stars

Watchers

Forks