Files and Descriptions - 102104276/swe-sem2-battleship-group4 GitHub Wiki

The following is a file and description of all of the .vb files and multimedia assets that were contained within the initial project


MAIN FILES

These are the .vb files used in the program that are not part of ./Model folder


UtilityFunctions:

Screen elements styling and layout Such as: Element colours, and element width

File also draws elements on the screen Draws the background Draws animations such as explosions and splashes

Also checks is a mouse is within a rectangle

MenuController:

Sets all of the menu elements, their codes and their text values

i.e. the start menu, it ability for each word to link to a specific functions

Example, contained within file is the a method to display settings menu

HighScoreController:

Saves game data to text file after completion of a round

GameState:

An enum that lists all of the possible states the game can be in, which the program used to display relevant visual information or run specific methods

GameResources:

Loads all game assets, such as messages, sounds, images, animations As well as playing specific things, such as the loading and end screen for example This file also can free the specific resources

GameLogic:

This is the core loop for the game, which opens the graphical window, loads resources, refreshes the screen, handles user input and waits for the user to close the windows before exiting the program

GameController:

Essentially controls what happens over the course of the game Initialises the core objects used by the program and changes can based on the state of objects

As well as change the current state of the game, drawing different screens based on what the state of the game is Handling user input different, based on what the state of the game is

EndingGame:

Controls have happens at the end game screen after the game has concluded

DiscoveryController:

Handles the attack on a specific co-ordinates for a player

DeploymentController:

Controls the players actions during deployment phase


./Model Files

These files seemed to related purely to the game play aspects of the software, i.e. how do the player take turns, how does the AI run?, etc


AIHardPlayer:

Hard AI for opponent

AIMediumPlayer:

Medium AI for opponent

AI option:

An enum that sets the different AI levels

AIPlayer:

The class that calls the different AI level, and is responsible for the actual AI player turn happening Uses the selected AI class to fire at coordinates, checking they are valid

AttackResult:

Gives the result after a shot has been made, hence checking if there is an opponent's ships at you chosen coordinates

BattleShipsGames:

Adds two players to the game, ensures ships are deployed, check if players are destroyed and allows player to take their turns, i.e. shooting and swap players

Direction:

An enum dictating which way the ship can be oriented

ISeaGrid:

Provides read only data to player, allowing them to see and attack the opponent's grid.

Player:

Contains both the player and enemy's grids, checks if all ships are deployed and if all ships are destroyed Contains method to randomize deployment

Result of Attack:

An enum returning the possible results of an attack, either a hit or a miss

SeaGrid:

Is the grid upon which the ships are deployed

SeaGridAdapter:

Allows for the change in a sea grid, from the stock sea image asset to a ship image

Ship:

Contains information about the ship itself i.e. ship name, size number of hits taken and their location

ShipsName:

An enum of the different ship names

Tile:

The visual representation of a co-ordinate on the game board Has fields about where is it located, if there is a ship on it Has methods about what actions can be assign to it, i.e. shoot it

TileView:

An enum that dictates the different possible state for a tile


./Resources

highscores.txt

A text file listing the top scores within the game

MULTIMEDIA ASSETS


./Resources/animations Files


splash.txt

Contains instructions for how the frames of the splash and explosion animations should play out

startup.txt

The opening animation for SwinGame


./Resources/fonts


  • arial.tff - Used in EndingGameController
  • cour.tff - Used in HighGameScoreController for listing fonts
  • ffaccess.tff - Used in DiscoveryController, MenuController,
  • maven_pro_regular.tff - Not Used

./Resources/images Files

deploy.jpg

The backdrop image for the deploy screen

deploy_button_hl.png

The background graphic element for the deploy button

deploy_dir_button_horiz.png

The direction buttons, which belong to the boarder, with the button moving the horizontal position of the ship being highlighted

deploy_dir_button_vert.png

The direction buttons, which belong to the boarder, with the button moving the vertical position of the ship being highlighted

deploy_play_button.png

The image for the play button, that belongs to the boarder deploy button

deploy_randomize_button.png

The image for the randomize button

discover.png

The image for the backdrop of the main game screen, where the player verses an AI opponent

explosion.png

an image that depicts the different frames of the explosion animation

fdFile.png

An image depicting a basic file icon

fdFolder.png

An image depicting a basic folder icon

FileDialog_Active.png

Not used in solution

FileDialog_Background.png

Not used in solution

FileDialog_Inactive.png

Not used in solution

FileDialog_Scroll.png

Not used in solution

FileDialog_ScrollSmall.png

Not used in solution

loader_empty.png

Show the load bar image, depicting a state where no resources are loaded

loader_full.png

Show the load bar image, depicting a state where all of the resources are loaded

main.png

The backdrop image for the home screen of the solution

ship_deploy_horiz_1.png

An image of the 1 length ship place horizontally

ship_deploy_horiz_2.png

An image of the 2 length ship place horizontally

ship_deploy_horiz_3.png

An image of the 3 length ship place horizontally

ship_deploy_horiz_4.png

An image of the 4 length ship place horizontally

ship_deploy_horiz_5.png

An image of the 5 length ship place horizontally

ship_deploy_vert_1.png

An image of the 1 length ship place vertically

ship_deploy_vert_2.png

An image of the 2 length ship place vertically

ship_deploy_vert_3.png

An image of the 3 length ship place vertically

ship_deploy_vert_4.png

An image of the 4 length ship place vertically

ship_deploy_vert_5.png

An image of the 5 length ship place vertically

splash.png

The image sequence for the splash animation used in the game

SplashBack.png

The backdrop for the solution loading screen

Swinburne.jpg

A standard swinburne logo image

SwinGameAni.jpg

The swingame loading/opening animation img sequence used in the game

SwinGameAni.png

A white background based swingame loading/opening animation img sequence


./Resources/sounds

error.wav DeploymentController:

if the ship placement exceeds the grid, an error sound is played

GameController:

If you have already taken your shoot for your turn, an error sound is played

GameResources:

The sound effect is loaded in here

hit.wav

GameController:

The sound effect is played inside a method name PlayHitSequence, which is run when the player makes a successful hit.

GameResources:

The sound effect is loaded in here

horrordrone.mp3

The sound file is the background music that plays throughout the duration of the game.

GameLogic:

The playing of the music is initiated here, before the main game loop

lose.wav

GameController:

Sound effect is played when Human player looses

Game Resources:

File is loaded

sink.wav

GameController:

Sound effect is player when the ResultOfAttack enum is in GameOver State

SwinGameStart.ogg

SwinGame start sound effects

SwinGameStart.wav

SwinGame start sound effects

watershot.wav

GameController:

When the player misses a shot, and hits the water; instead of hitting a ship, this sound effect is player

winner.wav

GameController:

When the human player wins the game, the winner sound effect is player