Giter Club home page Giter Club logo

battleship's Introduction

v 1.0

battleship ⚓

a sumple battleship game written in c using signals 🚥


Please do note there WILL BE memory leaks

This project uses SIGUSER1 and SIGUSER2 to carry out informatio between the two players,
translatting every move into binary and sending it bit by bit.


Maps can be any name and should be in a txt format and MUST be formated in the following way :
LENGTH : FIRST_SQUARE : LAST_SQUARE

where LENGTH is the length of the ship, FIRST_SQUARE and LAST_SQUARE its first and last positions.
In this file, you must have 4 ships (of lengths 2,3,4 and 5).
Otherwise there will be an error !


Usage ⏸️


(Requires GCC to work)

Start with : make to build project
you will now have a battleship binary
(feel free to move it where ever pleases you).
(you might need to chmod +x battleship to allow its execution)

📺 quick tutorial:

./battleship <path to map> # lauches the game for player one
# this will output you a PID (5 digit number)

./battleship <PID> <path to map> # launches the game for player two

Now each player will have to enter a move each turn, and will have to wait for the other to do so !
And the rest is just the game


Author 🫂

@mathis
@vianney

Please do note this project was made as an Epitech project and as such has to follow its coding style
(so its not my fault if code looks bad af)

This project is finished

battleship's People

Contributors

mielsense avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

tvianney

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.