Class Move
Representation of a Chess Move
Inherited Members
System.Object.Equals(System.Object, System.Object)
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 Move
Constructors
| Improve this Doc View SourceMove(Square, Square, PieceType)
Creates a Move
Declaration
public Move(Square from, Square to, PieceType promoteTo = PieceType.NONE)
Parameters
Type | Name | Description |
---|---|---|
Square | from | From Square |
Square | to | To Square |
PieceType | promoteTo | Promotion piece type |
Move(Int32, Int32, PieceType)
Creates a Move
Declaration
public Move(int from, int to, PieceType promoteTo = PieceType.NONE)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | from | Index of from square (0..63) |
System.Int32 | to | Index of to square (0..63) |
PieceType | promoteTo | Promotion piece type |
Move(String)
Creates a Move from it's notation as used in UCI protocol
Declaration
public Move(string uciString)
Parameters
Type | Name | Description |
---|---|---|
System.String | uciString | Move in UCI notation |
Fields
| Improve this Doc View SourceB0_0
King-side castle black
Declaration
public static Move B0_0
Field Value
Type | Description |
---|---|
Move |
B0_0_0
Queen-side castle black
Declaration
public static Move B0_0_0
Field Value
Type | Description |
---|---|
Move |
NULL
Null move
Declaration
public static Move NULL
Field Value
Type | Description |
---|---|
Move |
W0_0
King-side castle white
Declaration
public static Move W0_0
Field Value
Type | Description |
---|---|
Move |
W0_0_0
Queen-side castle white
Declaration
public static Move W0_0_0
Field Value
Type | Description |
---|---|
Move |
Properties
| Improve this Doc View SourceFrom
From square of the Move
Declaration
public Square From { get; set; }
Property Value
Type | Description |
---|---|
Square |
PromoteTo
If the move is a promotion move the piece type to which the pawn get's promoted
Declaration
public PieceType PromoteTo { get; set; }
Property Value
Type | Description |
---|---|
PieceType |
To
To square of the Move
Declaration
public Square To { get; set; }
Property Value
Type | Description |
---|---|
Square |
Methods
| Improve this Doc View SourceEquals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
ToUCIString()
Converts the move to a string using the notation needed for UCI engine communication. E.g. "e2e4" or "b7b8q"
Declaration
public string ToUCIString()
Returns
Type | Description |
---|---|
System.String | The move in UCI notation |