BattleShip Legacy Code - SolarZephyr/BS GitHub Wiki

Files and their functions:

SRC folder:

GameLogic:
A basic setup of a gameloop which runs until the window is closed. It checks for input and calls the DrawScreen() function.

DeploymentController:
Handles movement(?) and Drawing Deployment, as well as containing a number of private consts, presumably measurements for onscreen buttons..

DiscoveryController:
Handles battle Phase. Selects where a player is to attack based on a point2D (mouse input).

EndingGameController:
Provides a win screen or a lose screen at the end of a game.

GameController:
Responsible for handling the user input and changing game states. Contains a lot of crucial functions like Attack(), etc.

GameResources:
Loads all the required assets such as fonts and images.

GameState:
Represents the game's state.

HighScoreController:
Responsible for collecting and displaying HighScore Data.

MenuController:
Handles menu interaction and the drawing of the menus.

UtilityFunctions:
Contains a variety of functions that help with drawing and some that help with mouse interaction.