@ -0,0 +1,23 @@
function steinInReihe(reiheImFeld) {
// Feld mit Steinen in Reihe
// O = kein Stein
// 1 = gruener Stein
// 2 = roter Stein
var reihe = [];
for (let i = 1; i <= 7; i++) {
var color = document.getElementById(reiheImFeld + "/" + i).style.backgroundColor;
if (color == "red") {
reihe.push(2);
}else if (color == "green") {
reihe.push(1);
} else {
reihe.push(0);
}
return reihe;
@ -8,6 +8,7 @@
<script src="./JS/steinSetzen.js"></script>
<script src="./JS/spielerWechsel.js"></script>
<script src="./JS/steineInSpalte.js"></script>
<script src="./JS/steineInReihe.js"></script>
<script src="./JS/naechsteFreierPlatz.js"></script>
<script src="./JS/vierInSpalte.js"></script>
<script src="./JS/gewinnErmitteln.js"></script>