Unité ChessTypes

Description

Types utilisés pour la représentation du jeu.

Aperçu

Classes, interfaces, enregistrements et objets

Nom Description
Enregistrement TChessPiece Type et couleur d'une pièce.
Enregistrement TPositionData  
Enregistrement TMove  

Fonctions et procédures

function OtherColor(const AColor: TPieceColorWide): TPieceColorWide;
function ValidPromotionValue(const AValue: TPieceTypeWide): TPieceType;
function DataToStr(const AData: TPositionData): string;

Types

TPieceTypeWide = (...);
TPieceType = ptPawn..ptKing;
TPieceColorWide = (...);
TPieceColor = pcWhite..pcBlack;
TBoard = array[1..8, 1..8] of TChessPiece;
TCastling = (...);
TCastlingRights = array[TCastling] of integer;
PPositionData = ˆTPositionData;
TGameState = (...);
TMoveInfo = (...);
TMoveInfoSet = set of TMoveInfo;
PMove = ˆTMove;

Constantes

CPieceSymbol: array[TPieceColor, TPieceType] of char = ( ('P', 'N', 'B', 'R', 'Q', 'K'), ('p', 'n', 'b', 'r', 'q', 'k') );
CColorSymbol: array[TPieceColor] of char = ('w', 'b');
CNoMove: TMove = (FX1: 0; FY1: 0; FX2: 0; FY2: 0; FType: ptNil; FColor: pcNil; FInfo: []);

Description

Fonctions et procédures

function OtherColor(const AColor: TPieceColorWide): TPieceColorWide;

This item has no description.

function ValidPromotionValue(const AValue: TPieceTypeWide): TPieceType;

This item has no description.

function DataToStr(const AData: TPositionData): string;

This item has no description.

Types

TPieceTypeWide = (...);

Type de la pièce, y compris la valeur "néant".

Valeurs
  • ptPawn
  • ptKnight
  • ptBishop
  • ptRook
  • ptQueen
  • ptKing
  • ptNil
TPieceType = ptPawn..ptKing;

Type de la pièce.

TPieceColorWide = (...);

Couleur de la pièce, y compris la valeur "néant".

Valeurs
  • pcWhite
  • pcBlack
  • pcNil
TPieceColor = pcWhite..pcBlack;

Couleur de la pièce.

TBoard = array[1..8, 1..8] of TChessPiece;

Tableau de pièces.

TCastling = (...);

Type de roque (blanc, noir, côté H, côté A).

Valeurs
  • caWH
  • caWA
  • caBH
  • caBA
TCastlingRights = array[TCastling] of integer;

Autorisation de roquer. Valeurs possible : 0 (roque interdit), 1 à 8 (roque autorisé). Les valeurs différentes de zéro indiquent la colonne sur laquelle se trouve la tour.

PPositionData = ˆTPositionData;

Représentation de la position.

TGameState = (...);

État du jeu.

Valeurs
  • gsProgress
  • gsCheckmate
  • gsStalemate
  • gsDraw
TMoveInfo = (...);

Type de coup.

Valeurs
  • miCapture
  • miH_Castling
  • miA_Castling
  • miKnight
  • miBishop
  • miRook
  • miQueen
TMoveInfoSet = set of TMoveInfo;

This item has no description.

PMove = ˆTMove;

Coup.

Constantes

CPieceSymbol: array[TPieceColor, TPieceType] of char = ( ('P', 'N', 'B', 'R', 'Q', 'K'), ('p', 'n', 'b', 'r', 'q', 'k') );

This item has no description.

CColorSymbol: array[TPieceColor] of char = ('w', 'b');

This item has no description.

CNoMove: TMove = (FX1: 0; FY1: 0; FX2: 0; FY2: 0; FType: ptNil; FColor: pcNil; FInfo: []);

This item has no description.


Produit par PasDoc 1.0.4.