|
|
@ -457,10 +457,10 @@ function checkWinCondition(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function score (field){
|
|
|
|
function score (field){
|
|
|
|
if(field.piece === 0 && turnPlayer === "Player-Turn: X" && scoreCounterX > 10){
|
|
|
|
if(field.piece === 0 && turnPlayer === "Player-Turn: X" && scoreCounterX > 25){
|
|
|
|
scoreCounterX -= 10;
|
|
|
|
scoreCounterX -= 5;
|
|
|
|
} else if(field.piece === 0 && turnPlayer === "Player-Turn: O" && scoreCounterO > 10){
|
|
|
|
} else if(field.piece === 0 && turnPlayer === "Player-Turn: O" && scoreCounterO > 25){
|
|
|
|
scoreCounterO -= 10;
|
|
|
|
scoreCounterO -= 5;
|
|
|
|
} else if (field.piece === 1){
|
|
|
|
} else if (field.piece === 1){
|
|
|
|
scoreO += scoreCounterO;
|
|
|
|
scoreO += scoreCounterO;
|
|
|
|
scoreCounterO = 100;
|
|
|
|
scoreCounterO = 100;
|
|
|
|