Lots of changes
This commit is contained in:
@@ -19,7 +19,7 @@ final class EngineTests: XCTestCase {
|
||||
}
|
||||
}
|
||||
func testDiagonalMoves() throws {
|
||||
let b: Bishop = .init(color: .White, on: .init(rank: 4, file: 4))
|
||||
let b: Bishop = .init(with: .White, on: .init(rank: 4, file: 4))
|
||||
let result = [
|
||||
Square.Position(rank: 5, file: 3),
|
||||
Square.Position(rank: 6, file: 2),
|
||||
@@ -39,7 +39,7 @@ final class EngineTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testLinearMoves() throws {
|
||||
let r: Rook = .init(color: .White, on: .init(rank: 4, file: 4))
|
||||
let r: Rook = .init(with: .White, on: .init(rank: 4, file: 4))
|
||||
let result = [
|
||||
Square.Position(rank: 5, file: 4),
|
||||
Square.Position(rank: 6, file: 4),
|
||||
@@ -60,7 +60,7 @@ final class EngineTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testKingMoves() throws {
|
||||
let k: King = .init(color: .White, on: .init(rank: 2, file: 8))
|
||||
let k: King = .init(with: .White, on: .init(rank: 2, file: 8))
|
||||
let result = [
|
||||
Square.Position(rank: 3, file: 8),
|
||||
Square.Position(rank: 1, file: 8),
|
||||
@@ -72,7 +72,7 @@ final class EngineTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testKnightMoves() throws {
|
||||
let n: Knight = .init(color: .White, on: .init(rank: 4, file: 4))
|
||||
let n: Knight = .init(with: .White, on: .init(rank: 4, file: 4))
|
||||
let result = [
|
||||
Square.Position(rank: 6, file: 5),
|
||||
Square.Position(rank: 6, file: 3),
|
||||
@@ -87,7 +87,7 @@ final class EngineTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testPawnMoves() throws {
|
||||
let pw: Pawn = .init(color: .White, on: .init(rank: 4, file: 4))
|
||||
let pw: Pawn = .init(with: .White, on: .init(rank: 4, file: 4))
|
||||
var result = [
|
||||
Square.Position(rank: 5, file: 4),
|
||||
Square.Position(rank: 6, file: 4),
|
||||
@@ -95,7 +95,7 @@ final class EngineTests: XCTestCase {
|
||||
Square.Position(rank: 5, file: 3),
|
||||
]
|
||||
XCTAssertEqual(result, pw.pseudoLegalPositions)
|
||||
let pb: Pawn = .init(color: .Black, on: .init(rank: 4, file: 4))
|
||||
let pb: Pawn = .init(with: .Black, on: .init(rank: 4, file: 4))
|
||||
result = [
|
||||
Square.Position(rank: 3, file: 4),
|
||||
Square.Position(rank: 2, file: 4),
|
||||
|
||||
Reference in New Issue
Block a user