• Home
  • API documentation
Show / Hide Table of Contents
  • ChessSharp
    • ChessUtilities
    • GameBoard
    • GameState
    • Move
    • Piece
    • Player
  • ChessSharp.Pieces
    • Bishop
    • King
    • Knight
    • Pawn
    • PawnPromotion
    • Queen
    • Rook
  • ChessSharp.SquareData
    • File
    • Rank
    • Square

Class Move

Represents a game move.

Inheritance
System.Object
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: ChessSharp
Assembly: ChessSharp.dll
Syntax
public class Move

Constructors

| Improve this Doc View Source

Move(Square, Square, Player, Nullable<PawnPromotion>)

Initializes a new instance of the Move class with the given arguments.

Declaration
public Move(Square source, Square destination, Player player, PawnPromotion? promoteTo = default(PawnPromotion? ))
Parameters
Type Name Description
Square source

The source Square of the Move.

Square destination

The destination Square of the Move.

Player player

The Player of the Move.

System.Nullable<PawnPromotion> promoteTo

Optional nullable PawnPromotion of the Move. Default value is null.

Properties

| Improve this Doc View Source

Destination

Gets the destination Square of the Move.

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

Player

Gets the Player of the Move.

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

PromoteTo

Gets a nullable PawnPromotion of the Move.

Declaration
public PawnPromotion? PromoteTo { get; }
Property Value
Type Description
System.Nullable<PawnPromotion>
| Improve this Doc View Source

Source

Gets the source Square of the Move.

Declaration
public Square Source { get; }
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

GetAbsDeltaX()

Gets the absolute value of the subtraction of the source file and the destination file.

Declaration
public int GetAbsDeltaX()
Returns
Type Description
System.Int32

Returns an integer that is the subtraction of the source file and the destination file.

| Improve this Doc View Source

GetAbsDeltaY()

Gets the absolute value of the subtraction of the source rank and the destination rank.

Declaration
public int GetAbsDeltaY()
Returns
Type Description
System.Int32

Returns an integer that is the subtraction of the source rank and the destination rank.

| Improve this Doc View Source

GetDeltaX()

Gets the subtraction of the source file from the destination file.

Declaration
public int GetDeltaX()
Returns
Type Description
System.Int32

Returns an integer that is the subtraction of the source file from the destination file.

| Improve this Doc View Source

GetDeltaY()

Gets the subtraction of the source rank from the destination rank.

Declaration
public int GetDeltaY()
Returns
Type Description
System.Int32

Returns an integer that is the subtraction of the source rank from the destination rank.

| 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
Back to top Generated by DocFX