C# Class BattleShip.Ship

Show file Open project: LucienCamuglia/Battleships Class Usage Examples

Public Methods

Method Description
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)

Method Details

GetCaseShip() public method

public GetCaseShip ( ) : BattleShip.casePlatform[]
return BattleShip.casePlatform[]

IsInThePlatform() public method

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
return void

Ship() public method

public Ship ( int boat, int size ) : System
boat int
size int
return System

Ship() public method

public Ship ( int boat, int size, Point Location ) : System
boat int
size int
Location Point
return System

drawShip() public method

draw a boat
public drawShip ( Graphics g ) : void
g System.Drawing.Graphics
return void

isBetweenCase() public method

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
return bool

rotateBoat() public method

rotate the boat (inverse the height and the width of the boat)
public rotateBoat ( ) : void
return void