changed code -> Scoring is now more forgiving (-5 instead of -10 for not killing, 25 instead of 10 minimum)

master
ElGurkus 4 years ago
parent 2317488087
commit 989db432c1

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

Loading…
Cancel
Save