Skip to content
This repository has been archived by the owner on Feb 12, 2020. It is now read-only.
/ lemIPC Public archive

IA fighting through Inter Processus Communication.

Notifications You must be signed in to change notification settings

sshmaxime/lemIPC

Repository files navigation

lemIPC

https://medium.com/@maximeaubanel/lemipc-ea969cfe1cdd

The goal is to fight players (spread over several teams) on a two dimensions game board.

The last team remaining on the board is the winner.

To kill a player, a minimum of two players from the same team (and different from the first) need to be in contact with the player to kill. It means on a square next to the one where the player you want to kill stands on. (including diagonally)

When a player realizes he is surrounded by at least 2 players of the same opponent team, he must leave the board game

A square cannot host more than one player simultaneously

Technical Constraints

Each client is a process and there should be only one executable, which means that the first player to start will create shared resources (shm, msgq, semaphores)

Similarly, when a player leaves the game, he must check if he is the last player on the board. Indeed, the last process to quit is responsible for cleaning all IPCs created by the first process.

The board must be stored in a shared memory segment (shm). Each player can see the contents of the board as he wishes, but to change it, it must respect the shared resource constraints and competitive access (semaphores).

A player can only communicate with other players by msgQ.

You must implement a team strategy of some kind.

On the board, a player can see if a square is empty or if it contains a player. In this case, it’s the number of the team which is available. It is not possible to differentiate two players of the same team.

Getting Started

1 - Launch ./lemipc with 2 parameters.

              The first one is the pwd, you can use . or `pwd`.
              The second one is the team of the first player.

2 - Launch ./Graphic with one parameters.

              The first one is the pwd, you can use . or `pwd`.

3 - Add player to the game by using "./lemipc pwd X"

              X = team number (1,2,3,4,5 ...)

4 - For more fun, use the script.sh

Prerequisites & How to get them

  • CSFML ( sudo apt-get install libcsfml-dev )

Authors

Acknowledgments

This project have been made during my studies at EPITECH Montpellier.

About

IA fighting through Inter Processus Communication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published