mchess-server/chess/bishop.go
2023-06-27 22:32:24 +02:00

22 lines
450 B
Go

package chess
import (
"mchess_server/types"
)
type Bishop struct {
Color types.ChessColor
}
func (b Bishop) GetAllAttackedSquares(board Board, fromSquare types.Coordinate) []types.Coordinate {
return b.GetAllNonBlockedMoves(board, fromSquare)
}
func (b Bishop) GetColor() types.ChessColor {
return b.Color
}
func (b Bishop) GetAllNonBlockedMoves(board Board, fromSquare types.Coordinate) []types.Coordinate {
return []types.Coordinate{}
}