mchess-server/chess/rook.go

21 lines
380 B
Go
Raw Normal View History

package chess
import "local/m/mchess_server/types"
type Rook struct {
Color types.ChessColor
HasMoved bool
}
func (Rook) AfterMoveAction() {
}
// GetColor implements Piece.
func (r Rook) GetColor() types.ChessColor {
return r.Color
}
func (r Rook) GetAllLegalAndIllegalMoves(board Board, fromSquare types.Coordinate) []types.Coordinate {
return []types.Coordinate{}
}