|
@ -10,3 +10,15 @@ describe("Test Vier Gewinnt", () => { |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe("Test Vier Gewinnt", () => { |
|
|
|
|
|
it("Test vierDiagonalLinks: Vier Diagonal nach links erkennen und Gewinner 2(Rot) zuruek geben", () =>{ |
|
|
|
|
|
expect(vierDiagonalLinks([[0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 1, 2, 2, 0, 0], [1, 2, 2, 0, 0, 0], [1, 2, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0]])).toBe(2); |
|
|
|
|
|
expect(vierDiagonalLinks([[1, 2, 1, 2, 0, 0], [1, 2, 2, 0, 0, 0], [1, 2, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]])).toBe(2); |
|
|
|
|
|
expect(vierDiagonalLinks([[0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 1, 2, 1, 2, 2], [1, 2, 1, 2, 2, 0], [1, 2, 1, 2, 0, 0], [2, 1, 2, 0, 0, 0]])).toBe(2); |
|
|
|
|
|
expect(vierDiagonalLinks([[1, 1, 2, 1, 2, 2], [1, 2, 1, 2, 2, 0], [1, 2, 1, 2, 0, 0], [2, 1, 2, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]])).toBe(2); |
|
|
|
|
|
expect(vierDiagonalLinks([[0, 0, 0, 0, 0, 0], [2, 1, 2, 1, 2, 0], [1, 2, 1, 2, 0, 0], [1, 2, 2, 0, 0, 0], [1, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0]])).toBe(2); |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
}) |