|
|
@ -0,0 +1,12 @@ |
|
|
|
const vierDiagonalLinks = require("../JS/vierDiagonalLinks"); |
|
|
|
|
|
|
|
describe("Test Vier Gewinnt", () => { |
|
|
|
it("Test vierDiagonalLinks: Vier Diagonal nach links erkennen und Gewinner 1(Gruen) zuruek geben", () =>{ |
|
|
|
expect(vierDiagonalLinks([[0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [2, 2, 1, 1, 0, 0], [2, 1, 1, 0, 0, 0], [2, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0]])).toBe(1); |
|
|
|
expect(vierDiagonalLinks([[2, 1, 2, 1, 0, 0], [2, 1, 1, 0, 0, 0], [2, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]])).toBe(1); |
|
|
|
expect(vierDiagonalLinks([[0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [2, 2, 1, 2, 1, 1], [2, 1, 2, 1, 1, 0], [2, 1, 2, 1, 0, 0], [1, 2, 1, 0, 0, 0]])).toBe(1); |
|
|
|
expect(vierDiagonalLinks([[2, 2, 1, 2, 1, 1], [2, 1, 2, 1, 1, 0], [2, 1, 2, 1, 0, 0], [1, 2, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]])).toBe(1); |
|
|
|
expect(vierDiagonalLinks([[0, 0, 0, 0, 0, 0], [1, 2, 1, 2, 1, 0], [2, 1, 2, 1, 0, 0], [2, 1, 1, 0, 0, 0], [2, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 2, 2, 0, 0, 0]])).toBe(1); |
|
|
|
|
|
|
|
}) |
|
|
|
}) |