C# Класс BattleShip.Ship

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

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

Метод Описание
GetCaseShip ( ) : BattleShip.casePlatform[]
IsInThePlatform ( int mouseX, int mouseY, GameBoard platform ) : void

check if the boats are in the ally platform and fit him to case

Ship ( int boat, int size ) : System
Ship ( int boat, int size, Point Location ) : System
drawShip ( Graphics g ) : void

draw a boat

isBetweenCase ( int mouseX, int mouseY ) : bool

Check the postion of the boat and the cursor of the mouse

rotateBoat ( ) : void

rotate the boat (inverse the height and the width of the boat)

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

GetCaseShip() публичный Метод

public GetCaseShip ( ) : BattleShip.casePlatform[]
Результат BattleShip.casePlatform[]

IsInThePlatform() публичный Метод

check if the boats are in the ally platform and fit him to case
public IsInThePlatform ( int mouseX, int mouseY, GameBoard platform ) : void
mouseX int position x of the mouse cursor
mouseY int position y of the mouse cursor
platform GameBoard
Результат void

Ship() публичный Метод

public Ship ( int boat, int size ) : System
boat int
size int
Результат System

Ship() публичный Метод

public Ship ( int boat, int size, Point Location ) : System
boat int
size int
Location Point
Результат System

drawShip() публичный Метод

draw a boat
public drawShip ( Graphics g ) : void
g System.Drawing.Graphics
Результат void

isBetweenCase() публичный Метод

Check the postion of the boat and the cursor of the mouse
public isBetweenCase ( int mouseX, int mouseY ) : bool
mouseX int position x of the mouse cursor
mouseY int position y of the mouse cursor
Результат bool

rotateBoat() публичный Метод

rotate the boat (inverse the height and the width of the boat)
public rotateBoat ( ) : void
Результат void