Show / Hide Table of Contents

Class Move

Representation of a Chess Move

Inheritance
System.Object
Move
ExtendedMove
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 Source

Move(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

| Improve this Doc View Source

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

| Improve this Doc View Source

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 Source

B0_0

King-side castle black

Declaration
public static Move B0_0
Field Value
Type Description
Move
| Improve this Doc View Source

B0_0_0

Queen-side castle black

Declaration
public static Move B0_0_0
Field Value
Type Description
Move
| Improve this Doc View Source

NULL

Null move

Declaration
public static Move NULL
Field Value
Type Description
Move
| Improve this Doc View Source

W0_0

King-side castle white

Declaration
public static Move W0_0
Field Value
Type Description
Move
| Improve this Doc View Source

W0_0_0

Queen-side castle white

Declaration
public static Move W0_0_0
Field Value
Type Description
Move

Properties

| Improve this Doc View Source

From

From square of the Move

Declaration
public Square From { get; set; }
Property Value
Type Description
Square
| Improve this Doc View Source

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
| Improve this Doc View Source

To

To square of the Move

Declaration
public Square To { get; set; }
Property Value
Type Description
Square

Methods

| Improve this Doc View Source

Equals(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

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX