C# Class Game.Figure

Mostra file Open project: porcellus/KomponensAlapuJatek Class Usage Examples

Protected Properties

Property Type Description
_board Board
_figureType FigureType
_legalSteps LinkedList
_row int
_white bool

Public Methods

Method Description
Clone ( ) : Figure
Figure ( FigureType type, int r, int c, Board b ) : System
calculateLegalSteps ( ) : void
getCol ( ) : int
getFigureType ( ) : FigureType
getLegalSteps ( ) : LinkedList
getLegalSteps ( Board board, Figure figure, bool fromCheckTest ) : LinkedList
getRow ( ) : int
isLegalStep ( Board board, int fromRow, int fromCol, int toRow, int toCol ) : StepType
isLegalStep ( int r, int c ) : StepType
isWhite ( ) : bool
setBoard ( Board board ) : void
setColor ( bool w ) : void
setRC ( int r, int c ) : void

Protected Methods

Method Description
isEnemy ( Board board, int fr, int fc, int r, int c ) : bool
isEnemy ( int r, int c ) : bool

Method Details

Clone() public method

public Clone ( ) : Figure
return Figure

Figure() public method

public Figure ( FigureType type, int r, int c, Board b ) : System
type FigureType
r int
c int
b Board
return System

calculateLegalSteps() public method

public calculateLegalSteps ( ) : void
return void

getCol() public method

public getCol ( ) : int
return int

getFigureType() public method

public getFigureType ( ) : FigureType
return FigureType

getLegalSteps() public method

public getLegalSteps ( ) : LinkedList
return LinkedList

getLegalSteps() public static method

public static getLegalSteps ( Board board, Figure figure, bool fromCheckTest ) : LinkedList
board Board
figure Figure
fromCheckTest bool
return LinkedList

getRow() public method

public getRow ( ) : int
return int

isEnemy() protected static method

protected static isEnemy ( Board board, int fr, int fc, int r, int c ) : bool
board Board
fr int
fc int
r int
c int
return bool

isEnemy() protected method

protected isEnemy ( int r, int c ) : bool
r int
c int
return bool

isLegalStep() public static method

public static isLegalStep ( Board board, int fromRow, int fromCol, int toRow, int toCol ) : StepType
board Board
fromRow int
fromCol int
toRow int
toCol int
return StepType

isLegalStep() public method

public isLegalStep ( int r, int c ) : StepType
r int
c int
return StepType

isWhite() public method

public isWhite ( ) : bool
return bool

setBoard() public method

public setBoard ( Board board ) : void
board Board
return void

setColor() public method

public setColor ( bool w ) : void
w bool
return void

setRC() public method

public setRC ( int r, int c ) : void
r int
c int
return void

Property Details

_board protected_oe property

protected Board,Game _board
return Board

_figureType protected_oe property

protected FigureType _figureType
return FigureType

_legalSteps protected_oe property

protected LinkedList _legalSteps
return LinkedList

_row protected_oe property

protected int _row
return int

_white protected_oe property

protected bool _white
return bool