mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
AI: refactor PassAbility usage, added additional runtime checks
This commit is contained in:
parent
d57a3c100d
commit
06138ab3d3
6 changed files with 31 additions and 16 deletions
|
|
@ -20,9 +20,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class MCTSPlayer extends ComputerPlayer {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(MCTSPlayer.class);
|
||||
|
||||
protected PassAbility pass = new PassAbility();
|
||||
private static final Logger logger = Logger.getLogger(MCTSPlayer.class);
|
||||
|
||||
private NextAction nextAction;
|
||||
|
||||
|
|
@ -32,12 +30,10 @@ public class MCTSPlayer extends ComputerPlayer {
|
|||
|
||||
public MCTSPlayer(UUID id) {
|
||||
super(id);
|
||||
this.pass.setControllerId(id);
|
||||
}
|
||||
|
||||
public MCTSPlayer(final MCTSPlayer player) {
|
||||
super(player);
|
||||
this.pass = player.pass.copy();
|
||||
this.nextAction = player.nextAction;
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +44,7 @@ public class MCTSPlayer extends ComputerPlayer {
|
|||
|
||||
protected List<ActivatedAbility> getPlayableAbilities(Game game) {
|
||||
List<ActivatedAbility> playables = getPlayable(game, true);
|
||||
playables.add(pass);
|
||||
playables.add(new PassAbility());
|
||||
return playables;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue