mchess-server/chess/knight.go

20 lines
366 B
Go
Raw Normal View History

package chess
2023-06-25 14:11:29 +00:00
import "mchess_server/types"
type Knight struct {
Color types.ChessColor
}
// AfterMoveAction implements Piece.
2023-06-25 14:11:29 +00:00
func (k Knight) AfterMoveAction() {
}
func (k Knight) GetColor() types.ChessColor {
return k.Color
}
2023-06-25 14:11:29 +00:00
func (k Knight) GetAllMovesButBlocked(board Board, fromSquare types.Coordinate) []types.Coordinate {
return []types.Coordinate{}
}