mchess-server/chess/bishop.go

22 lines
450 B
Go
Raw Normal View History

package chess
2023-06-27 20:32:24 +00:00
import (
"mchess_server/types"
)
type Bishop struct {
Color types.ChessColor
}
2023-06-27 20:32:24 +00:00
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
}
2023-06-27 20:32:24 +00:00
func (b Bishop) GetAllNonBlockedMoves(board Board, fromSquare types.Coordinate) []types.Coordinate {
return []types.Coordinate{}
}