C# Class MBC.App.FormBattleship.Controls.FieldPanel

Inheritance: System.Windows.Forms.Panel
Datei anzeigen Open project: aiclub/Mohawk_Battleship

Public Methods

Method Description
FieldPanel ( ) : System
GetCoordinatesFromMouse ( int mouseX, int mouseY ) : Coordinates
SetCellShip ( Coordinates coordinates, ShipPiece shipPiece, int section, ShipOrientation orientation ) : void
SetCellState ( Coordinates coordinates, CellState state ) : void

Protected Methods

Method Description
OnPaint ( PaintEventArgs e ) : void

Private Methods

Method Description
DrawCellHover ( Graphics g ) : void
DrawCellStateAndShips ( Graphics g ) : void
GetShipImage ( ShipPiece piece ) : Image
GetShipImage ( ShipPiece piece, int section ) : Image

Method Details

FieldPanel() public method

public FieldPanel ( ) : System
return System

GetCoordinatesFromMouse() public method

public GetCoordinatesFromMouse ( int mouseX, int mouseY ) : Coordinates
mouseX int
mouseY int
return Coordinates

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

SetCellShip() public method

public SetCellShip ( Coordinates coordinates, ShipPiece shipPiece, int section, ShipOrientation orientation ) : void
coordinates Coordinates
shipPiece ShipPiece
section int
orientation ShipOrientation
return void

SetCellState() public method

public SetCellState ( Coordinates coordinates, CellState state ) : void
coordinates Coordinates
state CellState
return void