Package megamek.client.bot.princess
Class FiringPlan
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<FiringPlan>,Iterable<WeaponFireInfo>,Collection<WeaponFireInfo>,List<WeaponFireInfo>,RandomAccess,SequencedCollection<WeaponFireInfo>
FiringPlan is a series of
WeaponFireInfo objects describing a full attack turn- Since:
- 12/18/13 1:20 PM
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Method Summary
Modifier and TypeMethodDescriptionclone()intcompareTo(FiringPlan other) Compares to FiringPlans based on utility.booleanbooleanintgetTwist()doubleinthashCode()voidsetDirectionalMountFacings(Map<Integer, Boolean> directionalMountFacings) Sets the Directional Torso Mount arc changes this plan declares.voidsetFlipArms(boolean flipArms) voidsetTwist(int twist) voidsetUtility(double utility) toString()Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, contains, ensureCapacity, forEach, get, getFirst, getLast, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAllMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Method Details
-
clone
- Overrides:
clonein classArrayList<WeaponFireInfo>
-
getUtility
public double getUtility() -
setUtility
public void setUtility(double utility) -
getTwist
public int getTwist() -
setTwist
public void setTwist(int twist) -
getDirectionalMountFacings
- Returns:
- a map of equipment number to chosen rear (
true) / front (false) arc for each Directional Torso Mount this plan flips from the shooter's current facing (BMM p.83)
-
setDirectionalMountFacings
Sets the Directional Torso Mount arc changes this plan declares. The plan only ever reads the given map (and copies it inclone()), so callers may pass an immutable map such asMap.of()when there are no mounts to orient.- Parameters:
directionalMountFacings- a map of equipment number to chosen rear (true) / front (false) arc; never mutated by the plan
-
getFlipArms
public boolean getFlipArms() -
setFlipArms
public void setFlipArms(boolean flipArms) -
getTarget
- Returns:
- Who is being shot at?
-
equals
- Specified by:
equalsin interfaceCollection<WeaponFireInfo>- Specified by:
equalsin interfaceList<WeaponFireInfo>- Overrides:
equalsin classArrayList<WeaponFireInfo>
-
toString
- Overrides:
toStringin classAbstractCollection<WeaponFireInfo>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<WeaponFireInfo>- Specified by:
hashCodein interfaceList<WeaponFireInfo>- Overrides:
hashCodein classArrayList<WeaponFireInfo>
-
compareTo
Compares to FiringPlans based on utility. Higher utility is better.- Specified by:
compareToin interfaceComparable<FiringPlan>
-