19 lines
347 B
Go
19 lines
347 B
Go
package chess
|
|
|
|
import "mchess_server/types"
|
|
|
|
type Rook struct {
|
|
Color types.ChessColor
|
|
}
|
|
|
|
func (r Rook) AfterMoveAction() {
|
|
}
|
|
|
|
func (r Rook) GetColor() types.ChessColor {
|
|
return r.Color
|
|
}
|
|
|
|
func (r Rook) GetAllMovesButBlocked(board Board, fromSquare types.Coordinate) []types.Coordinate {
|
|
return board.GetNonBlockedRowAndColumn(fromSquare)
|
|
}
|