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; }