fix 'attempt to negate with overflow'
This commit is contained in:
parent
9950d712e4
commit
06a35bda10
@ -74,10 +74,10 @@ impl Move {
|
||||
// if this board results in the opponent winning, MAJORLY negatively weigh this move
|
||||
// NOTE! this branch isn't completely deleted because if so, the bot wouldn't make a move.
|
||||
// We shouldn't prune branches because we still need to always react to the opponent's moves
|
||||
return i64::MIN;
|
||||
return i64::MIN + 1;
|
||||
} else if self.winner == Winner::Player(agent_color) {
|
||||
// results in a win for the agent
|
||||
return i64::MAX;
|
||||
return i64::MAX - 1;
|
||||
} else if self.winner == Winner::Tie {
|
||||
// idk what a Tie should be valued?
|
||||
return 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user