C# Class Chess.Data.Entities.ChessPiece

Inheritance: IPiece, IModifiable
Afficher le fichier Open project: colin-higgins/ChessSharp Class Usage Examples

Private Properties

Свойство Type Description
DestroyOccupant void

Méthodes publiques

Méthode Description
GetPieceType ( ) : PieceType
GetValidMoves ( Square board ) : IEnumerable
IsLegalMove ( Square board, Move move, IEnumerable pastMoves = null ) : bool
Move ( Square board, Move move ) : void

Méthodes protégées

Méthode Description
GetAttacker ( Square board, Move move ) : ChessPiece
GetDestinationPiece ( Square board, Move move ) : ChessPiece
GetDiagonalMoves ( Square board, int row, int column, int>.List endPositions ) : void
GetHorizontalMoves ( Square board, int row, int column, int>.List endPositions ) : void
GetMovementModifier ( int change ) : int
GetOppositeTeam ( ) : Team
GetVerticalMoves ( Square board, int column, int row, int>.List endPositions ) : void
HasCollision ( Square board, Move move ) : bool
InBounds ( int row, int column ) : bool
LegalDirectionByTeam ( ) : int
SetupNewMove ( int row, int column ) : Move
ValidateNotAttackingSameTeam ( Square board, Move move ) : void

Private Methods

Méthode Description
DestroyOccupant ( Square board, Move move ) : void

Method Details

GetAttacker() protected méthode

protected GetAttacker ( Square board, Move move ) : ChessPiece
board Square
move Move
Résultat ChessPiece

GetDestinationPiece() protected méthode

protected GetDestinationPiece ( Square board, Move move ) : ChessPiece
board Square
move Move
Résultat ChessPiece

GetDiagonalMoves() protected méthode

protected GetDiagonalMoves ( Square board, int row, int column, int>.List endPositions ) : void
board Square
row int
column int
endPositions int>.List
Résultat void

GetHorizontalMoves() protected méthode

protected GetHorizontalMoves ( Square board, int row, int column, int>.List endPositions ) : void
board Square
row int
column int
endPositions int>.List
Résultat void

GetMovementModifier() protected méthode

protected GetMovementModifier ( int change ) : int
change int
Résultat int

GetOppositeTeam() protected méthode

protected GetOppositeTeam ( ) : Team
Résultat Team

GetPieceType() public méthode

public GetPieceType ( ) : PieceType
Résultat PieceType

GetValidMoves() public abstract méthode

public abstract GetValidMoves ( Square board ) : IEnumerable
board Square
Résultat IEnumerable

GetVerticalMoves() protected méthode

protected GetVerticalMoves ( Square board, int column, int row, int>.List endPositions ) : void
board Square
column int
row int
endPositions int>.List
Résultat void

HasCollision() protected méthode

protected HasCollision ( Square board, Move move ) : bool
board Square
move Move
Résultat bool

InBounds() protected méthode

protected InBounds ( int row, int column ) : bool
row int
column int
Résultat bool

IsLegalMove() public abstract méthode

public abstract IsLegalMove ( Square board, Move move, IEnumerable pastMoves = null ) : bool
board Square
move Move
pastMoves IEnumerable
Résultat bool

LegalDirectionByTeam() protected méthode

protected LegalDirectionByTeam ( ) : int
Résultat int

Move() public méthode

public Move ( Square board, Move move ) : void
board Square
move Move
Résultat void

SetupNewMove() protected méthode

protected SetupNewMove ( int row, int column ) : Move
row int
column int
Résultat Move

ValidateNotAttackingSameTeam() protected méthode

protected ValidateNotAttackingSameTeam ( Square board, Move move ) : void
board Square
move Move
Résultat void