|
|
@ -1,7 +1,11 @@ |
|
|
|
const vierDiagonalRechts = require("../JS/vierDiagonalRechts"); |
|
|
|
|
|
|
|
describe("Test Vier Gewinnt", () => { |
|
|
|
it("Test vierDiagonalRechts: rückgabe des Arrays testen", () =>{ |
|
|
|
it("Test vierDiagonalRechts: Vier Diagonal erkennen und Gewinner zuruek geben", () =>{ |
|
|
|
expect(vierDiagonalRechts([[1, 0, 0, 0, 0, 0], [2, 1, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0], [2, 2, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]])).toBe(1); |
|
|
|
expect(vierDiagonalRechts([[1, 2, 1, 0, 0, 0], [2, 1, 2, 1, 0, 0], [2, 1, 1, 2, 1, 0], [2, 2, 1, 2, 1, 1], [0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]])).toBe(1); |
|
|
|
expect(vierDiagonalRechts([[2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [2, 1, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0], [2, 1, 2, 1, 0, 0], [1, 2, 1, 2, 1, 0]])).toBe(1); |
|
|
|
expect(vierDiagonalRechts([[2, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [1, 2, 1, 0, 0, 0], [2, 1, 2, 1, 0, 0], [2, 1, 2, 1, 1, 0], [2, 2, 1, 2, 1, 1]])).toBe(1); |
|
|
|
expect(vierDiagonalRechts([[2, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0], [1, 2, 1, 0, 0, 0], [2, 1, 2, 1, 0, 0], [2, 1, 2, 1, 1, 0], [2, 2, 1, 2, 1, 1], [1, 0, 0, 0, 0, 0]])).toBe(1); |
|
|
|
}) |
|
|
|
}) |