K. Code Documention (part 2) - SwinbeeMiles/MyBattleship GitHub Wiki
Documented by: Zikri Dawek
The following are the newly added comments on the functions and modules that do not have their respective comments.
GameController.cs
- PlayHitSequence(...) - Plays the corresponding animation sequence and sound if an explosion animation was carried out.
- PlayMissSequence(...) - Plays the corresponding animation sequence and sound if a splash animation was carried out.
- GameController() - Initializes the state that the player is inhabiting in the main menu.
GameResources.cs
- LoadFonts() - Loads the fonts.
- LoadImages() - Loads the images.
- LoadSounds() - Loads the sounds.
- LoadMusic() - Loads the music.
- LoadResources() - Loads the resources.
- ShowLoadingScreen() - Shows the loading screen.
- PlaySwinGameIntro() - Plays the SwinGame intro.
- ShowMessage() - Shows the message.
- EndLoadingScreen() - Ends the loading screen.
- NewFont(...) - Loads custom font from the resource folder.
- NewImage(...) - Loads custom images from the resource folder.
- NewTransparentColorImage(...) - Loads a custom type of images from the resource folder.
- NewTransparentColorImage(...) - Loads a custom type of images from the resource folder.
- NewSound(...) - Loads custom sound files from the resource folder.
- NewMusic(...) - Loads custom music files from the resource folder.
- FreeFonts() - Frees up the font used from the process.
- FreeImages() - Frees up the image used from the process.
- FreeSounds() - Frees up the sound file used from the process.
- FreeMusic() - Frees up the music file used from the process.
- FreeResource() - Frees up the loaded assets from the process.
UtilityFunction.cs
- AddExplosion(...) - Adds the explosion animation at the given position.
- AddSplash(...) - Adds the splash animation at the given position.
- AddAnimation(...) - Adds a specified animation to a given position.
- UpdateAnimations() - Updates the animation that has been specified on a select tile.
- DrawAnimations() - Draws the animation that that had been specified on a select tile.
- DrawAnimationSequence() - Draws the the animation sequence that has been specified on a select tile.
AIPlayer.cs
- AIPlayer(...) - Initializes a new instance of the AIplayer class.
ISeaGrid.cs
- Width - Gets the width.
- Height - Gets the height.
Player.cs
- RandomizeDeployment() - Randomizes the deployment for the ships when initiated.
- Player(...) - Initializes a new instance of the Player class.
- IsDestroyed - Gets a value indicating whether all of the ships are destroyed.
- Hits - Gets the number of hits that the player has made.
- Score - Gets the player's score.
- GetEnumerator1() - Gets the enumerator.
Ship.cs
- Column - Gets the column location of the ship.
- Direction - Gets the direction of the ship.
- Ship(...) - Initializes a new instance of the Ship class.
- Hit() - Increases the hits taken counter if a shot hits the enemy's ship.
- IsDestroyed - Gets a value indicating whether a ship is destroyed.
AIHardPlayer.cs
- Target(...) - Initializes a new instance of the Target class.
- AIHardPlayer(...) - Initializes a new instance of the AIHardPlayer class.
AIMediumPlayer.cs
- AIMediumPlayer(...) - Initializes a new instance of the AIMediumPlayer class.