mchess-server/types/move.go
2023-06-25 16:11:29 +02:00

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
}