Adjust auto mover scoring.
This commit is contained in:
parent
f74396f257
commit
17be4f3709
@ -937,10 +937,10 @@ const INTERFACE = {
|
||||
let target_id = GAME_DATA.board.tiles[next_move.tile].piece;
|
||||
if(target_id !== null) {
|
||||
let target = GAME_DATA.board.pieces[target_id];
|
||||
if(target.player == opponent) { score += 1 + target.piece; }
|
||||
if(target.player == opponent) { score += target.piece; }
|
||||
}
|
||||
|
||||
if(next_move.check) { score += 2; }
|
||||
if(next_move.check) { score += 1; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -973,14 +973,14 @@ const INTERFACE = {
|
||||
let target_id = GAME_DATA.board.tiles[move.tile].piece;
|
||||
if(target_id !== null) {
|
||||
let target = GAME_DATA.board.pieces[target_id];
|
||||
if(target.player == opponent) { score += 2 * (1 + target.piece); }
|
||||
if(target.player == opponent) { score += 1 + target.piece; }
|
||||
else { score -= 1; }
|
||||
}
|
||||
|
||||
score += +((-MATH.sign_branch(player) * (hex.y - current_hex.y)) > 0);
|
||||
|
||||
// Add score for check.
|
||||
if(move.check) { score += 2; }
|
||||
if(move.check) { score += 1; }
|
||||
|
||||
let moves_from = GAME_DATA.movement_tiles(piece, move.tile);
|
||||
for(let next_move of moves_from) {
|
||||
@ -989,10 +989,10 @@ const INTERFACE = {
|
||||
let target_id = GAME_DATA.board.tiles[next_move.tile].piece;
|
||||
if(target_id !== null) {
|
||||
let target = GAME_DATA.board.pieces[target_id];
|
||||
if(target.player == opponent) { score += 1 + target.piece; }
|
||||
if(target.player == opponent) { score += target.piece; }
|
||||
}
|
||||
|
||||
if(next_move.check) { score += 2; }
|
||||
if(next_move.check) { score += 1; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user