C# 클래스 BattleShip.GameBoard

파일 보기 프로젝트 열기: LucienCamuglia/Battleships 1 사용 예제들

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