22 lines
442 B
Go
22 lines
442 B
Go
package chess
|
|
|
|
import (
|
|
"mchess_server/types"
|
|
)
|
|
|
|
type King struct {
|
|
Color types.ChessColor
|
|
}
|
|
|
|
func (k King) GetAllAttackedSquares(board Board, fromSquare types.Coordinate) []types.Coordinate {
|
|
return k.GetAllNonBlockedMoves(board, fromSquare)
|
|
}
|
|
|
|
func (k King) GetColor() types.ChessColor {
|
|
return k.Color
|
|
}
|
|
|
|
func (k King) GetAllNonBlockedMoves(board Board, fromSquare types.Coordinate) []types.Coordinate {
|
|
return []types.Coordinate{}
|
|
}
|