mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Merge pull request #2238 from tool4ever/simfix
Simulation: Fix including unjustified decisions
This commit is contained in:
@@ -81,9 +81,11 @@ public class SimulationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void doneEvaluating(Score score) {
|
public void doneEvaluating(Score score) {
|
||||||
if (score.value > bestScore.value) {
|
// if we're here during a deeper level this hasn't been called for the level above yet
|
||||||
|
// in such case we need to check that this decision has really lead to the improvement in score
|
||||||
|
if (getLastDecision().initialScore.value < score.value && score.value > bestScore.value) {
|
||||||
bestScore = score;
|
bestScore = score;
|
||||||
bestSequence = currentStack.get(currentStack.size() - 1);
|
bestSequence = getLastDecision();
|
||||||
}
|
}
|
||||||
currentStack.remove(currentStack.size() - 1);
|
currentStack.remove(currentStack.size() - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,7 +254,6 @@ public class Cost implements Serializable {
|
|||||||
else
|
else
|
||||||
manaParts.append(part).append(" ");
|
manaParts.append(part).append(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsedMana == null && (manaParts.length() > 0 || xCantBe0)) {
|
if (parsedMana == null && (manaParts.length() > 0 || xCantBe0)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user