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.
13 lines
900 B
13 lines
900 B
function vierInSpalte(spalte){
|
|
if(spalte == [0, 0, 1, 1, 1, 1] || spalte == [0, 1, 1, 1, 1, 0] || spalte == [1, 1, 1, 1, 0, 0]|| spalte == [1, 1, 1, 1, 1, 0]|| spalte == [0, 1, 1, 1, 1, 1]|| spalte == [1, 1, 1, 1, 1, 1] || spalte == [2, 2, 1, 1, 1, 1] || spalte == [2, 1, 1, 1, 1, 2] || spalte == [1, 1, 1, 1, 2, 2]|| spalte == [1, 1, 1, 1, 1, 2]|| spalte == [2, 1, 1, 1, 1, 1]){
|
|
//Spieler Gruen
|
|
return 1;
|
|
}
|
|
else if(spalte == [0, 0, 2, 2, 2, 2] || spalte == [0, 2, 2, 2, 2, 0] || spalte == [2, 2, 2, 2, 0, 0]|| spalte == [2, 2, 2, 2, 2, 0]|| spalte == [0, 2, 2, 2, 2, 2]|| spalte == [2, 2, 2, 2, 2, 2] || spalte == [1, 1, 2, 2, 2, 2] || spalte == [1, 2, 2, 2, 2, 1] || spalte == [2, 2, 2, 2, 1, 1]|| spalte == [2, 2, 2, 2, 2, 1]|| spalte == [1, 2, 2, 2, 2, 2]){
|
|
//Spieler Rot
|
|
return 2;
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|
|
module.exports = vierInSpalte;
|