Sliding pieces moves are now illegal if after piece of same color
This commit is contained in:
@@ -65,7 +65,7 @@ public class Piece: Hashable {
|
||||
internal var pseudoLegalPositions: [Square.Position] {
|
||||
return []
|
||||
}
|
||||
internal var legalPositions = [Square.Position]()
|
||||
package internal(set) var legalPositions = [Square.Position]()
|
||||
internal func getLegalPosition() {
|
||||
legalPositions = pseudoLegalPositions.filter { isLegal(on: $0) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user