BoardPiece class

A model representing a shogi board piece

Annotations
  • @immutable

Constructors

BoardPiece({PlayerType player = PlayerType.sente, required PieceType pieceType, Position? position})
const

Properties

hashCode int
The hash code for this object.
no setteroverride
isPromoted bool
Whether the piece is promoted
no setter
isSente bool
Whether the piece belongs to sente
no setter
pieceType PieceType
The board piece type
final
player PlayerType
Which player the piece belongs to
final
position Position?
The piece's board position
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

displayString({bool usesJapanese = true}) String
The pieces display string
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representation of the model
override

Operators

operator ==(dynamic other) bool
The equality operator.
override