Table of Contents
This project basic principle is: a reproduction of the existing game Battleship playable with a bot (no multiplayer).
- Play with a bot.
- Save the game to play later.
- Game options are configurable.
This project is a personal project and it was my first steps with the C language and Linux programming.
Entire project was built with C and is only compatible with Linux.
Doxygen docs can be generated in HTML by running doxygen
command on file doxy/Doxyfile
(Doxygen must be installed on your system).
Case symbols meaning:
O
: Water case.
#
: Water case that represents the boundary of a ship.
B
: Case containing the piece of a ship (should be hit).
X
: Piece of a ship destroyed.
?
: Not discovered case.
To get a local copy up and running follow the steps:
To compile the project, you will need:
apt-get install make
Optional dependency:
apt-get install doxygen
- Clone the repo:
git clone https://github.com/Akwd22/bataille-navale.git
- Compile the project:
cd bin make
You can configure game options such as the size of the game board and the number of boats through launch parameters:
--help
to get the list of parameters:
Battleship
Usage:
./main [options]
Options:
--help Display the list of launch parameters.
--lp <integer> Length of the game board (between 5-25 included).
--hp <integer> Height of the game board (between 5-25 included).
--tf <integer> Fleet size (between 1-10 included).