Package megamek.ai.dataset
Class WeaponDataEncoder
java.lang.Object
megamek.ai.dataset.WeaponDataEncoder
WeaponDataEncoder encodes weapons as a list of Integers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEncodedWeaponData(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.
-
Constructor Details
-
WeaponDataEncoder
public WeaponDataEncoder()
-
-
Method Details
-
getEncodedWeaponData
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]
-