C# 클래스 Chess.Data.Entities.ChessPiece

상속: IPiece, IModifiable
파일 보기 프로젝트 열기: colin-higgins/ChessSharp 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DestroyOccupant void

공개 메소드들

메소드 설명
GetPieceType ( ) : PieceType
GetValidMoves ( Square board ) : IEnumerable
IsLegalMove ( Square board, Move move, IEnumerable pastMoves = null ) : bool
Move ( Square board, Move move ) : void

보호된 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
DestroyOccupant ( Square board, Move move ) : void

메소드 상세

GetAttacker() 보호된 메소드

protected GetAttacker ( Square board, Move move ) : ChessPiece
board Square
move Move
리턴 ChessPiece

GetDestinationPiece() 보호된 메소드

protected GetDestinationPiece ( Square board, Move move ) : ChessPiece
board Square
move Move
리턴 ChessPiece

GetDiagonalMoves() 보호된 메소드

protected GetDiagonalMoves ( Square board, int row, int column, int>.List endPositions ) : void
board Square
row int
column int
endPositions int>.List
리턴 void

GetHorizontalMoves() 보호된 메소드

protected GetHorizontalMoves ( Square board, int row, int column, int>.List endPositions ) : void
board Square
row int
column int
endPositions int>.List
리턴 void

GetMovementModifier() 보호된 메소드

protected GetMovementModifier ( int change ) : int
change int
리턴 int

GetOppositeTeam() 보호된 메소드

protected GetOppositeTeam ( ) : Team
리턴 Team

GetPieceType() 공개 메소드

public GetPieceType ( ) : PieceType
리턴 PieceType

GetValidMoves() 공개 추상적인 메소드

public abstract GetValidMoves ( Square board ) : IEnumerable
board Square
리턴 IEnumerable

GetVerticalMoves() 보호된 메소드

protected GetVerticalMoves ( Square board, int column, int row, int>.List endPositions ) : void
board Square
column int
row int
endPositions int>.List
리턴 void

HasCollision() 보호된 메소드

protected HasCollision ( Square board, Move move ) : bool
board Square
move Move
리턴 bool

InBounds() 보호된 메소드

protected InBounds ( int row, int column ) : bool
row int
column int
리턴 bool

IsLegalMove() 공개 추상적인 메소드

public abstract IsLegalMove ( Square board, Move move, IEnumerable pastMoves = null ) : bool
board Square
move Move
pastMoves IEnumerable
리턴 bool

LegalDirectionByTeam() 보호된 메소드

protected LegalDirectionByTeam ( ) : int
리턴 int

Move() 공개 메소드

public Move ( Square board, Move move ) : void
board Square
move Move
리턴 void

SetupNewMove() 보호된 메소드

protected SetupNewMove ( int row, int column ) : Move
row int
column int
리턴 Move

ValidateNotAttackingSameTeam() 보호된 메소드

protected ValidateNotAttackingSameTeam ( Square board, Move move ) : void
board Square
move Move
리턴 void