Raphael Elström
2 years ago
2 changed files with 27 additions and 5 deletions
@ -0,0 +1,20 @@ |
|||
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++) { |
|||
|
|||
if (document.getElementById( i +"/"+ spalte).style.backgroundColor == "red") { |
|||
zeile.push(2); |
|||
}if (document.getElementById(i + "/"+ spalte).style.backgroundColor == "green") { |
|||
zeile.push(1); |
|||
} else { |
|||
zeile.push(0); |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
Reference in new issue
xxxxxxxxxx