"My Navy" is a terminal-based game inspired by the classic Battleship game. It involves two players communicating with SIGUSER1 and SIGUSER2 signals. The game is played on an 8x8 grid, where players take turns to attack each other's navy.
- Game Mechanics: Players input coordinates to target the opponent's ships.
- Signal-Based Communication: Utilizes SIGUSER1 and SIGUSER2 for player interaction.
- Terminal-Based Interface: Runs in the terminal, showing player and enemy grids.
- Error Handling: Specifically handles errors, especially for incorrect navy file inputs.
- AI Opponent: An AI option for single-player mode.
- Customizable Settings: Options to customize game rules and mechanics.
- Multiplayer Mode: Allows for more than two players.
A modern twist on Battleship, challenging players to strategize in a terminal-based setting.
- GCC: The game is developed in C.
- Makefile: For compiling with specific rules.
- Linux Terminal
Maps must have 4 lengths and must be in this form :
2:C1:C2
3:D4:F4
4:B5:B8
5:D7:H7
[length]:[start_position]:[end_position]
Launch the game with:
FIRST USER :
make && ./my_navy navy_positions
SECOND USER :
make && ./my_navy [pid from first user] navy_positions
The game concludes when all of a player's ships are hit. The terminal announces the winner.