14 lines
342 B
Go
14 lines
342 B
Go
package types
|
|
|
|
type Move struct {
|
|
StartSquare Coordinate `json:"startSquare"`
|
|
EndSquare Coordinate `json:"endSquare"`
|
|
PieceMoved PieceShortName
|
|
ColorMoved ChessColor
|
|
PromotionToPiece *PieceShortName `json:"promotionToPiece,omitempty"`
|
|
}
|
|
|
|
func (m Move) IsPromotionMove() bool {
|
|
return m.PromotionToPiece != nil
|
|
}
|