You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
528 B
21 lines
528 B
function steinInSpalte(spalte) {
|
|
// Feld mit Steinen in Zeile
|
|
// O = kein Stein
|
|
// 1 = gruener Stein
|
|
// 2 = roter Stein
|
|
var zeile = [];
|
|
|
|
for (let i = 1; i <= 6; i++) {
|
|
var color = document.getElementById(i + "/" + spalte).style.backgroundColor;
|
|
|
|
if (color == "red") {
|
|
zeile.push(2);
|
|
}else if (color == "green") {
|
|
zeile.push(1);
|
|
} else {
|
|
zeile.push(0);
|
|
}
|
|
}
|
|
return zeile;
|
|
}
|
|
//module.exports = steinInSpalte;
|