Skip to content

Repository files navigation

Naval Systems: Command & Control

1. Problem statement

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.

2. Project Structure

/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

3. User manual

3.1. System Requirements

  • OS: Windows or Linux

  • Requires: SFML 2.5+

  • Compiler: C++17 or higher

3.2. Controls

  • 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.

3.3. Main Menu

  • Play: Start a new game

  • Info: View instructions and credits

  • Exit: Close the game

3.4. Info Page

  • Manual: Displays game instructions

  • Credits: Shows developer information

  • Back: Return to the main menu

3.5. Ship Types (Data Structures)

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

3.6. Game Phases

  1. Buying Phase: Spend your starting currency to purchase ships.

  2. Attack Phase: Click on enemy cells to launch attacks. Damage is based on operation cost.

  3. Upgrade Phase: Use upgrade points to boost ships.

3.7. In-Game Interface

  • Grid Map: Place and attack ships

  • Buttons: Buy, upgrade, select ships

  • Currency: Displays your available money

3.8. Rules

  • 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.

3.9. Build

To compile the project, make sure you have the SFML library installed and a C++17-compatible compiler.

3.9.1. Requirements

  • Clone the GitHub repository

  • SFML 2.5 or higher

  • g or another C17-compliant compiler

  • CMake (optional but recommended)

3.9.2. Compilation using make

You can simply run:

make run

4. Credits

  • Developed by: [SDOC]

  • Built with: C++ and SFML

  • José Pablo Brenes Coto C31289

  • Jorge Salas Lau C37130

  • Axel Rojas Retana C36944

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages