List of all Files w Details - HaydosBruh/Battleships GitHub Wiki

Here is a list of all files with a short description and the location them:

DeploymentController.vb Controls the players actions during the deployment phase, this is when players initially put the ships down, change their directions and ending the deployment. Also draws the deployment screen so that the player can view it on the screen.

DiscoveryController.vb Handles the battle phase of the game, attacks when user clicks on the screen.

EndingGameController.vb Manages the interactions at the end of the game, shows who has won and lost. Also shows high scores for the game

GameController.vb Manages the user input and current state of the entire game, starts new games, handles AI creation and human controls, draws screen, checks for changes to redraw screen and activate sounds and animations.

GameLogic.vb Creates the graphics window that the game will be played in and loads resources, also closes the game.

GameResources.vb Loads all fonts, sounds, animations, music, images, also initialises them to be stored in memory.

GameState.vb An enumerator that checks what state the game is currently in eg viewing menu or high scores.

HighScoreController.vb Handles storage and sorting of high scores, saves and reads scores from text file, draws scores to screen.

MenuController.vb Handles the drawing and user interactions from the menus in the game. Handles processing of user inputs when the menu is showing

UtilityFunctions.vb Holds utility methods for drawing and interactions with the mouse. Determines if the mouse is in a square, draws the field, draws grid and ships

AIHardPlayer.vb A type of AI player that will challenge humans to the highest level, it knows if ships are stacked next to each other and will shoot to kill. Handles targeting based on hits and misses, selects which space to shoot at.

AIMediumPlayer.vb Similar to hard but doesn’t know about ships placed next to each other, will only shoot at one ship at a time.

AIOption.vb Enumerator that handles which AI to assign based on the difficulty selected by the user

AIPlayer.vb Most basic AI that can deploy its ships and generate coordinates to shoot at player tiles.

AttackResult.vb Handles the result of all given shots by AI or player, checks if hit, miss or destroyed a ship, displays information about what has happened during the attack.

BattleShipsGame.vb Controls the majority of the game, adds players to the game, makes sure all ships are deployed, allows players to shoot and swap turns, checks if a player has been destroyed.

Direction.vb Enumerator to set direction of the ship when being placed

ISeaGrid.vb Defines an interface of a grid that is readonly so players can see and attack the opponents grid.

Player.vb Handles everything to do with the player, they have their own grid, and enemy grid, checks if ships are destroyed or al ships are destroyed.

ResultOfAttack.vb Enumerator or result of attack, hit, miss, destroyed, shotalready, gameover

SeaGrid.vb The grid upon which ships are deployed, can be viewed via ISeaGrid, also used with SeaGridAdaptor to mask position of the ships

SeaGridAdapter.vb Changes the view of the SeaGrid based upon what is happening, a ship is placed, hit or destroyed.

Ship.vb Defines the ships and details about itself, shipname, size, number of hits taken, location.

ShipName.vb Enumerator of ship names, Tug, Submarine, Destroyed, Battleship, AircraftCarrier

Tile.vb Tile is the individual square that all make up the grid, it knows its own location so that if it is shot or has a ship deployed it can change.

TileView.vb Enumerator of visible values for given tiles, Sea, miss, Ship, Hit

Any files (code or resources) that aren't being used or needed: