Files
swift-chess/Sources/Engine/Pieces/CommonMoves.swift
2024-06-26 22:46:58 +02:00

19 lines
470 B
Swift

internal protocol DiagonalMoves {
func getDiagonalMoves(from pos: Square.Position) -> [Square.Position]
}
extension DiagonalMoves {
func getDiagonalMoves(from pos: Square.Position) -> [Square.Position] {
return []
}
}
internal protocol LinearMoves {
func getLinearMoves(from pos: Square.Position) -> [Square.Position]
}
extension LinearMoves {
func getLinearMoves(from pos: Square.Position) -> [Square.Position] {
return []
}
}