C# Class ChessDotNet.Pieces.King

Inheritance: Piece
Show file Open project: ProgramFOX/Chess.NET

Public Methods

Method Description
GetFenCharacter ( ) : char
GetValidMoves ( Position from, bool returnIfAny, ChessGame game, bool>.Func gameMoveValidator ) : ReadOnlyCollection
IsValidMove ( Move move, ChessGame game ) : bool
King ( Player owner ) : System
King ( Player owner, bool hasCastlingAbility ) : System

Protected Methods

Method Description
CanCastle ( Position origin, Position destination, ChessGame game ) : bool

Method Details

CanCastle() protected method

protected CanCastle ( Position origin, Position destination, ChessGame game ) : bool
origin Position
destination Position
game ChessGame
return bool

GetFenCharacter() public method

public GetFenCharacter ( ) : char
return char

GetValidMoves() public method

public GetValidMoves ( Position from, bool returnIfAny, ChessGame game, bool>.Func gameMoveValidator ) : ReadOnlyCollection
from Position
returnIfAny bool
game ChessGame
gameMoveValidator bool>.Func
return ReadOnlyCollection

IsValidMove() public method

public IsValidMove ( Move move, ChessGame game ) : bool
move Move
game ChessGame
return bool

King() public method

public King ( Player owner ) : System
owner Player
return System

King() public method

public King ( Player owner, bool hasCastlingAbility ) : System
owner Player
hasCastlingAbility bool
return System