C# 클래스 ChessDotNet.ChessGame

파일 보기 프로젝트 열기: ProgramFOX/Chess.NET 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
Board ChessDotNet.Piece[][]
checkmatedCacheBlack Cache
checkmatedCacheWhite Cache
fiftyMoves bool
inCheckCacheBlack Cache
inCheckCacheWhite Cache
stalematedCacheBlack Cache
stalematedCacheWhite Cache

공개 메소드들

메소드 설명
ApplyMove ( Move move, bool alreadyValidated ) : MoveType
ChessGame ( ) : System
ChessGame ( GameCreationData data ) : System
ChessGame ( IEnumerable moves, bool movesAreValidated ) : System
ChessGame ( string fen ) : System
ClaimDraw ( string reason ) : void
GetBoard ( ) : ChessDotNet.Piece[][]
GetFen ( ) : string
GetPieceAt ( File file, int rank ) : Piece
GetPieceAt ( Position position ) : Piece
GetValidMoves ( Player player ) : ReadOnlyCollection
GetValidMoves ( Position from ) : ReadOnlyCollection
HasAnyValidMoves ( Player player ) : bool
HasAnyValidMoves ( Position from ) : bool
IsCheckmated ( Player player ) : bool
IsDraw ( ) : bool
IsInCheck ( Player player ) : bool
IsStalemated ( Player player ) : bool
IsValidMove ( Move move ) : bool
IsWinner ( Player player ) : bool
MapPgnCharToPiece ( char c, Player owner ) : Piece
Resign ( Player player ) : void
WouldBeInCheckAfter ( Move move, Player player ) : bool

보호된 메소드들

메소드 설명
ApplyCastle ( Move move ) : CastlingType
CloneBoard ( Piece originalBoard ) : ChessDotNet.Piece[][]
FenStringToGameCreationData ( string fen ) : GameCreationData
GetValidMoves ( Player player, bool returnIfAny ) : ReadOnlyCollection
GetValidMoves ( Position from, bool returnIfAny ) : ReadOnlyCollection
IsValidMove ( Move move, bool validateCheck ) : bool
IsValidMove ( Move move, bool validateCheck, bool careAboutWhoseTurnItIs ) : bool
SetPieceAt ( File file, int rank, Piece piece ) : void
UseGameCreationData ( GameCreationData data ) : void

비공개 메소드들

메소드 설명
ChessGame ( Piece board, Player whoseTurn ) : System

메소드 상세

ApplyCastle() 보호된 메소드

protected ApplyCastle ( Move move ) : CastlingType
move Move
리턴 CastlingType

ApplyMove() 공개 메소드

public ApplyMove ( Move move, bool alreadyValidated ) : MoveType
move Move
alreadyValidated bool
리턴 MoveType

ChessGame() 공개 메소드

public ChessGame ( ) : System
리턴 System

ChessGame() 공개 메소드

public ChessGame ( GameCreationData data ) : System
data GameCreationData
리턴 System

ChessGame() 공개 메소드

public ChessGame ( IEnumerable moves, bool movesAreValidated ) : System
moves IEnumerable
movesAreValidated bool
리턴 System

ChessGame() 공개 메소드

public ChessGame ( string fen ) : System
fen string
리턴 System

ClaimDraw() 공개 메소드

public ClaimDraw ( string reason ) : void
reason string
리턴 void

CloneBoard() 보호된 정적인 메소드

protected static CloneBoard ( Piece originalBoard ) : ChessDotNet.Piece[][]
originalBoard Piece
리턴 ChessDotNet.Piece[][]

FenStringToGameCreationData() 보호된 메소드

protected FenStringToGameCreationData ( string fen ) : GameCreationData
fen string
리턴 GameCreationData

GetBoard() 공개 메소드

public GetBoard ( ) : ChessDotNet.Piece[][]
리턴 ChessDotNet.Piece[][]

GetFen() 공개 메소드

public GetFen ( ) : string
리턴 string

GetPieceAt() 공개 메소드

public GetPieceAt ( File file, int rank ) : Piece
file File
rank int
리턴 Piece

GetPieceAt() 공개 메소드

public GetPieceAt ( Position position ) : Piece
position Position
리턴 Piece

GetValidMoves() 공개 메소드

public GetValidMoves ( Player player ) : ReadOnlyCollection
player Player
리턴 ReadOnlyCollection

GetValidMoves() 보호된 메소드

protected GetValidMoves ( Player player, bool returnIfAny ) : ReadOnlyCollection
player Player
returnIfAny bool
리턴 ReadOnlyCollection

GetValidMoves() 공개 메소드

public GetValidMoves ( Position from ) : ReadOnlyCollection
from Position
리턴 ReadOnlyCollection

GetValidMoves() 보호된 메소드

protected GetValidMoves ( Position from, bool returnIfAny ) : ReadOnlyCollection
from Position
returnIfAny bool
리턴 ReadOnlyCollection

HasAnyValidMoves() 공개 메소드

public HasAnyValidMoves ( Player player ) : bool
player Player
리턴 bool

HasAnyValidMoves() 공개 메소드

public HasAnyValidMoves ( Position from ) : bool
from Position
리턴 bool

IsCheckmated() 공개 메소드

public IsCheckmated ( Player player ) : bool
player Player
리턴 bool

IsDraw() 공개 메소드

public IsDraw ( ) : bool
리턴 bool

IsInCheck() 공개 메소드

public IsInCheck ( Player player ) : bool
player Player
리턴 bool

IsStalemated() 공개 메소드

public IsStalemated ( Player player ) : bool
player Player
리턴 bool

IsValidMove() 공개 메소드

public IsValidMove ( Move move ) : bool
move Move
리턴 bool

IsValidMove() 보호된 메소드

protected IsValidMove ( Move move, bool validateCheck ) : bool
move Move
validateCheck bool
리턴 bool

IsValidMove() 보호된 메소드

protected IsValidMove ( Move move, bool validateCheck, bool careAboutWhoseTurnItIs ) : bool
move Move
validateCheck bool
careAboutWhoseTurnItIs bool
리턴 bool

IsWinner() 공개 메소드

public IsWinner ( Player player ) : bool
player Player
리턴 bool

MapPgnCharToPiece() 공개 메소드

public MapPgnCharToPiece ( char c, Player owner ) : Piece
c char
owner Player
리턴 Piece

Resign() 공개 메소드

public Resign ( Player player ) : void
player Player
리턴 void

SetPieceAt() 보호된 메소드

protected SetPieceAt ( File file, int rank, Piece piece ) : void
file File
rank int
piece Piece
리턴 void

UseGameCreationData() 보호된 메소드

protected UseGameCreationData ( GameCreationData data ) : void
data GameCreationData
리턴 void

WouldBeInCheckAfter() 공개 메소드

public WouldBeInCheckAfter ( Move move, Player player ) : bool
move Move
player Player
리턴 bool

프로퍼티 상세

Board 보호되어 있는 프로퍼티

protected Piece[][],ChessDotNet Board
리턴 ChessDotNet.Piece[][]

checkmatedCacheBlack 보호되어 있는 프로퍼티

protected Cache checkmatedCacheBlack
리턴 Cache

checkmatedCacheWhite 보호되어 있는 프로퍼티

protected Cache checkmatedCacheWhite
리턴 Cache

fiftyMoves 보호되어 있는 프로퍼티

protected bool fiftyMoves
리턴 bool

inCheckCacheBlack 보호되어 있는 프로퍼티

protected Cache inCheckCacheBlack
리턴 Cache

inCheckCacheWhite 보호되어 있는 프로퍼티

protected Cache inCheckCacheWhite
리턴 Cache

stalematedCacheBlack 보호되어 있는 프로퍼티

protected Cache stalematedCacheBlack
리턴 Cache

stalematedCacheWhite 보호되어 있는 프로퍼티

protected Cache stalematedCacheWhite
리턴 Cache