wip: create proper board analyzer for ai
This commit is contained in:
@ -57,4 +57,29 @@ class Piece {
|
||||
this.inventory = new HashSet<>(Arrays.asList(inventory));
|
||||
this.stone = null;
|
||||
}
|
||||
|
||||
private Piece(PieceType type, EntityID id, int hp, int maxHP, int mp, int maxMP, int ap, int maxAP, StoneType[] inventory, StoneType stone) {
|
||||
this.type = type;
|
||||
this.id = id;
|
||||
this.hp = new Stat(StatType.HP, hp, maxHP);
|
||||
this.mp = new Stat(StatType.MP, mp, maxMP);
|
||||
this.ap = new Stat(StatType.AP, ap, maxAP);
|
||||
this.inventory = new HashSet<>(Arrays.asList(inventory));
|
||||
this.stone = stone;
|
||||
}
|
||||
|
||||
public Piece clone() {
|
||||
return new Piece(
|
||||
this.type,
|
||||
this.id,
|
||||
this.hp.getValue(),
|
||||
this.hp.getMax(),
|
||||
this.mp.getValue(),
|
||||
this.mp.getMax(),
|
||||
this.ap.getValue(),
|
||||
this.ap.getMax(),
|
||||
this.inventory.toArray(new StoneType[0]),
|
||||
this.stone
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user