15 lines
318 B
Go
15 lines
318 B
Go
|
package types
|
||
|
|
||
|
type Move struct {
|
||
|
StartSquare Coordinate `json:"startSquare"`
|
||
|
EndSquare Coordinate `json:"endSquare"`
|
||
|
PromotionToPiece *PieceShortName `json:"promotionToPiece,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m Move) IsPromotionMove() bool {
|
||
|
if m.PromotionToPiece != nil {
|
||
|
return true
|
||
|
}
|
||
|
return false
|
||
|
}
|