|
@ -4,8 +4,8 @@ function gewinnErmittelnMock() { |
|
|
const vierDiagonalRechts = require("./vierDiagonalRechts"); |
|
|
const vierDiagonalRechts = require("./vierDiagonalRechts"); |
|
|
const vierDiagonalLinks = require("./vierDiagonalLinks"); |
|
|
const vierDiagonalLinks = require("./vierDiagonalLinks"); |
|
|
|
|
|
|
|
|
if (vierInSpalte([0, 0, 0, 0, 0, 0]) === 1 || vierInReihe([0, 0, 0, 0, 0, 0, 0]) === 1 || vierDiagonalRechts([[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]]) === 1 || 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]]) === 1) { |
|
|
|
|
|
return 1; |
|
|
|
|
|
|
|
|
if (vierInSpalte([0, 0, 0, 0, 0, 0]) === 2 || vierInReihe([0, 0, 0, 0, 0, 0, 0]) === 2 || vierDiagonalRechts([[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]]) === 2 || 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]]) === 2) { |
|
|
|
|
|
return 2; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |