changed code -> Scoring is now more forgiving (-5 instead of -10 for not killing, 25 instead of 10 minimum)
This commit is contained in:
parent
2317488087
commit
989db432c1
8
code.js
8
code.js
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user