The project consists of developing a turn-based naval combat simulator on a single PC. Each ship represents an algorithm or data structure, and the game focuses on the internal execution of searches and maintenance operations, without the need to represent them visually. The player interacts strategically through actions that affect the ships, which are identified by their names.
/assets # Textures, sounds, fonts
/bin # Compiled binary output
/include # Source code (.hpp)
/src # Source code (.cpp)
/doc # Documentation and diagrams
Makefile # Build script
README.adoc # Project documentation-
Left Click: Remove / Select -
Right Click: Attack / Put -
A: Switch between placing and attacking ships -
S: Toggles between ship selection mode and ship deletion mode.
-
Manual: Displays game instructions
-
Credits: Shows developer information
-
Back: Return to the main menu
Each ship has different performance characteristics depending on the data structure it uses:
| Ship Type | Data Structure |
|---|---|
LinearSearchShip |
Linked List |
BinarySearchShip |
Sorted Array |
SetShip |
Set container |
RedBlackTreeShip |
Red-Black Tree |
SplayTreeShip |
Splay Tree |
BTreeShip |
B-Tree |
-
Buying Phase: Spend your starting currency to purchase ships.
-
Attack Phase: Click on enemy cells to launch attacks. Damage is based on operation cost.
-
Upgrade Phase: Use upgrade points to boost ships.
-
Grid Map: Place and attack ships
-
Buttons: Buy, upgrade, select ships
-
Currency: Displays your available money
-
You have a limited number of actions per turn.
-
Ships lose health when attacked.
-
A ship is destroyed when its health reaches zero.
-
The player who sinks all opponent ships wins.
To compile the project, make sure you have the SFML library installed and a C++17-compatible compiler.
-
Clone the GitHub repository
-
SFML 2.5 or higher
-
g or another C17-compliant compiler
-
CMake (optional but recommended)