mchess-server/types/move.go

15 lines
318 B
Go
Raw Normal View History

2023-06-25 14:11:29 +00:00
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
}