C# Class BattleShip.GameBoard

Afficher le fichier Open project: LucienCamuglia/Battleships Class Usage Examples

Private Properties

Свойство Type Description
AddCoordinates void
AddLabelPlayer void
InitialisationGrille void
InitializeSize void

Méthodes publiques

Méthode 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

Méthode 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 méthode

Add the ship on the grid
public AddShip ( casePlatform shipCase ) : void
shipCase casePlatform
Résultat void

Display() public méthode

Drawing the board game
public Display ( PaintEventArgs pe ) : void
pe PaintEventArgs Element graphics
Résultat void

GameBoard() public méthode

Create a new gameboard 10x10 (case)
public GameBoard ( ) : System
Résultat System

GameBoard() public méthode

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
Résultat System

OverCase() public méthode

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
Résultat void

ToArrayGameboard() public méthode

public ToArrayGameboard ( ) : ].int[
Résultat ].int[

TouchedCase() public méthode

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
Résultat void