Move class

Represents a move played by a single player.

Implementers

Constructors

Move(Square from, Square to, [Piece? promotionTo])
Constructs new Move object for move from square to square.
const
Move.fromICString(String s)
Returns new Move object that corresponds to ICString representation s.
factory

Properties

from Square
Square from where the piece was taken.
final
hashCode int
The hash code for this object.
no setteroverride
promotionTo Piece?
If the piece moved is Pawn and it has reached last rank, then this field holds information to what Piece it was promoted.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
to Square
Square to where the piece was placed.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toICString() String
Returns String representaion of the move.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object? other) bool
The equality operator.
override