Class Chess
This class contains static methods useful when dealing with chess
Inheritance
System.Object
Chess
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: PonzianiComponents.Chesslib
Assembly: PonzianiComponents.dll
Syntax
public class Chess
Properties
| Improve this Doc View SourceSupportedLanguages
List of supported languages
Declaration
public static List<string> SupportedLanguages { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
Methods
| Improve this Doc View SourceGetColor(Piece)
Determines the color of a piecce
Declaration
public static Side GetColor(Piece piece)
Parameters
Type | Name | Description |
---|---|---|
Piece | piece | The piece |
Returns
Type | Description |
---|---|
Side | The color of the piece |
GetPiece(PieceType, Side)
Declaration
public static Piece GetPiece(PieceType pt, Side side)
Parameters
Type | Name | Description |
---|---|---|
PieceType | pt | Piece Type |
Side | side | Side |
Returns
Type | Description |
---|---|
Piece | Piece |
GetPieceType(Piece)
Provides the type of a given piece
Declaration
public static PieceType GetPieceType(Piece piece)
Parameters
Type | Name | Description |
---|---|---|
Piece | piece | A chess piece |
Returns
Type | Description |
---|---|
PieceType | The type of this chess piece |
ParsePieceTypeChar(Char)
Parses a PieceType Character ('Q', 'R', 'B', 'N', 'K' or 'P')
Declaration
public static PieceType ParsePieceTypeChar(char piecetypechar)
Parameters
Type | Name | Description |
---|---|---|
System.Char | piecetypechar | The Piece type character |
Returns
Type | Description |
---|---|
PieceType | the piece type value |
SquareToString(Square)
Get's the string representation (e.g. "a1" or "d5") of a square
Declaration
public static string SquareToString(Square square)
Parameters
Type | Name | Description |
---|---|---|
Square | square | The square |
Returns
Type | Description |
---|---|
System.String | The square's string representation |