Giter VIP home page Giter VIP logo

lemipc's Introduction

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.

lemipc's People

Contributors

sshmaxime avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.