Class WeaponDataEncoder

java.lang.Object
megamek.ai.dataset.WeaponDataEncoder

public class WeaponDataEncoder extends Object
WeaponDataEncoder encodes weapons as a list of Integers
  • Constructor Details

    • WeaponDataEncoder

      public WeaponDataEncoder()
  • Method Details

    • getEncodedWeaponData

      public static List<Integer> getEncodedWeaponData(Entity entity)
      Encodes the weapons of an entity into a List of Integers; each weapon is encoded as a sequence of 5 integers which represents the max damage it causes, its arc, short range, medium range, and long range.
      Parameters:
      entity - The entity from which to encode the weapon data
      Returns:
      the encoded list [max damage, arc code, short range, medium range, long range]