import XCTest @testable import Model final class EmptyBoardTests: XCTestCase { private static let playerA = Player(name: "dummy A", piece_type: .A) private static let playerB = Player(name: "dummy B", piece_type: .B) private var board: Board! override func setUpWithError() throws { try super.setUpWithError() guard let board = Board(columns: 5, rows: 6) else { XCTFail() return } self.board = board } func testWidth() throws { XCTAssertEqual(board.columns, 5) } func testHeight() throws { XCTAssertEqual(board.rows, 6) } func testEmptyByDefault() throws { XCTAssertNil(board[1, 1]) let result = board.countPieces() XCTAssertEqual(result, 0) } func testCustomSubscript() throws { for r in 0..