C# Class Chess.Domain.GameManager

Show file Open project: colin-higgins/ChessSharp Class Usage Examples

Public Methods

Method Description
GameManager ( Game game ) : System
IsCheckmate ( ) : bool
IsDraw ( ) : bool
MarkGameAsDraw ( ) : void
MarkWinningTeam ( Team team ) : void
MovePiece ( Move move ) : void
TeamToMove ( ) : Team

Private Methods

Method Description
FitsCastleCriteria ( Move move, ChessPiece piece ) : bool
FitsEnPassantCriteria ( Move move, ChessPiece defender, ChessPiece piece ) : bool
GetMockSquares ( IEnumerable board ) : Chess.Data.Entities.Square[][]
GetOppositeTeam ( Team currentTeam ) : Team
IncrementMoveData ( Move move ) : void
IsKingInCheck ( Team currentTeam, IEnumerable board ) : bool
LastSixMovesAreRepeats ( ) : bool
MarkGameProgress ( ChessPiece piece, ChessPiece defender ) : void
MoveRookForCastle ( Move move ) : void
NeitherTeamCanCheckmate ( ) : bool
PerformEnPassant ( Move move ) : void
PerformMove ( Move move, ChessPiece defender, ChessPiece piece ) : void
PiecesCanCheckmate ( ChessPiece pieces ) : bool
SavesKing ( Move move ) : bool
ValidateActiveGame ( ) : void
ValidateIsCurrentTeam ( ChessPiece piece ) : void
ValidateIsLegalMove ( Move move, ChessPiece piece ) : void
ValidateKingNotInCheck ( Team currentTeam ) : void

Method Details

GameManager() public method

public GameManager ( Game game ) : System
game Chess.Data.Entities.Game
return System

IsCheckmate() public method

public IsCheckmate ( ) : bool
return bool

IsDraw() public method

public IsDraw ( ) : bool
return bool

MarkGameAsDraw() public method

public MarkGameAsDraw ( ) : void
return void

MarkWinningTeam() public method

public MarkWinningTeam ( Team team ) : void
team Team
return void

MovePiece() public method

public MovePiece ( Move move ) : void
move Chess.Data.Entities.Move
return void

TeamToMove() public method

public TeamToMove ( ) : Team
return Team