mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
latest monte carlo ai - has a memory leak
This commit is contained in:
parent
a06f27ec89
commit
dfffdfcf8c
38 changed files with 677 additions and 286 deletions
|
|
@ -374,20 +374,22 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void priority(Game game) {
|
||||
public boolean priority(Game game) {
|
||||
passed = false;
|
||||
if (!abort) {
|
||||
if (passedTurn && game.getStack().isEmpty()) {
|
||||
pass();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
game.firePriorityEvent(playerId);
|
||||
waitForResponse();
|
||||
if (response.getBoolean() != null) {
|
||||
pass();
|
||||
return false;
|
||||
} else if (response.getInteger() != null) {
|
||||
pass();
|
||||
passedTurn = true;
|
||||
return false;
|
||||
} else if (response.getString() != null && response.getString().equals("special")) {
|
||||
specialAction(game);
|
||||
} else if (response.getUUID() != null) {
|
||||
|
|
@ -403,7 +405,9 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
|||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue