C# Класс BattleShip.GameBoard

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddCoordinates void
AddLabelPlayer void
InitialisationGrille void
InitializeSize void

Открытые методы

Метод Описание
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é

Приватные методы

Метод Описание
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

Описание методов

AddShip() публичный метод

Add the ship on the grid
public AddShip ( casePlatform shipCase ) : void
shipCase casePlatform
Результат void

Display() публичный метод

Drawing the board game
public Display ( PaintEventArgs pe ) : void
pe PaintEventArgs Element graphics
Результат void

GameBoard() публичный метод

Create a new gameboard 10x10 (case)
public GameBoard ( ) : System
Результат System

GameBoard() публичный метод

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
Результат System

OverCase() публичный метод

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
Результат void

ToArrayGameboard() публичный метод

public ToArrayGameboard ( ) : ].int[
Результат ].int[

TouchedCase() публичный метод

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
Результат void