wip: prepare ai for using action trees and boards with score calculation

This commit is contained in:
2021-06-05 05:19:07 +02:00
parent aa1d2c48df
commit c97ff03a68
9 changed files with 338 additions and 18 deletions

View File

@ -0,0 +1,60 @@
package uulm.teamname.marvelous.gamelibrary.ai;
import uulm.teamname.marvelous.gamelibrary.entities.*;
import java.util.Arrays;
import java.util.HashSet;
class Piece {
public final PieceType type;
public final EntityID id;
public final Stat hp;
public final Stat mp;
public final Stat ap;
public final HashSet<StoneType> inventory;
public final StoneType stone;
public Piece(PieceType type) {
this.type = type;
this.id = null;
this.hp = null;
this.mp = null;
this.ap = null;
this.inventory = null;
this.stone = null;
}
public Piece(PieceType type, EntityID id, int hp, int maxHP) {
this.type = type;
this.id = id;
this.hp = new Stat(StatType.HP, hp, maxHP);
this.mp = null;
this.ap = null;
this.inventory = null;
this.stone = null;
}
public Piece(PieceType type, EntityID id, StoneType stone) {
this.type = type;
this.id = id;
this.hp = null;
this.mp = null;
this.ap = null;
this.inventory = null;
this.stone = stone;
}
public Piece(PieceType type, EntityID id, int hp, int maxHP, int mp, int maxMP, int ap, int maxAP, StoneType[] inventory) {
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 = null;
}
}