C# Class BattleShip.GameBoard

Show file Open project: LucienCamuglia/Battleships Class Usage Examples

Private Properties

Property Type Description
AddCoordinates void
AddLabelPlayer void
InitialisationGrille void
InitializeSize void

Public Methods

Method Description
AddShip ( casePlatform shipCase ) : void

Add the ship on the grid

Display ( PaintEventArgs pe ) : void

Drawing the board game

GameBoard ( ) : System

Create a new gameboard 10x10 (case)

GameBoard ( string name, int posX, int posY ) : System

Create a new gameboard 10x10 at the relative location

OverCase ( int x, int y ) : void

Verifie si la souris est sur uns case

ToArrayGameboard ( ) : ].int[
TouchedCase ( int x, int y ) : void

Verifie si un carré est touché

Private Methods

Method Description
AddCoordinates ( int coord, int pos ) : void

Creation of dynamic labels for coordonate

AddLabelPlayer ( ) : void

Add the name of the gameboard

InitialisationGrille ( ) : void

Initialize each case of the grid

InitializeSize ( ) : void

Calcul the size in pixel by the rapport in the number of case and the size

Method Details

AddShip() public method

Add the ship on the grid
public AddShip ( casePlatform shipCase ) : void
shipCase casePlatform
return void

Display() public method

Drawing the board game
public Display ( PaintEventArgs pe ) : void
pe PaintEventArgs Element graphics
return void

GameBoard() public method

Create a new gameboard 10x10 (case)
public GameBoard ( ) : System
return System

GameBoard() public method

Create a new gameboard 10x10 at the relative location
public GameBoard ( string name, int posX, int posY ) : System
name string
posX int Position X
posY int Position Y
return System

OverCase() public method

Verifie si la souris est sur uns case
public OverCase ( int x, int y ) : void
x int Position x de la souris
y int Position y de la souris
return void

ToArrayGameboard() public method

public ToArrayGameboard ( ) : ].int[
return ].int[

TouchedCase() public method

Verifie si un carré est touché
public TouchedCase ( int x, int y ) : void
x int Position x de la souris
y int Position y de la souris
return void