21 lines
380 B
Go
21 lines
380 B
Go
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{}
|
|
}
|