Record Class ActionRequest
java.lang.Object
java.lang.Record
idlab.colonyops.model.actions.ActionRequest
- Record Components:
turnNumber- the current turnmember- the full state of the squad member to act for (HP, location, weapon, consumable, crate contents)locationsInView- all tiles within the squad member's vision range, including the entities present at each tile
public record ActionRequest(int turnNumber, SquadMember member, List<EntitiesAtLocation> locationsInView)
extends Record
Sent to
POST /missions/{missionId}/request-action when the engine needs an
Action for a specific squad member this turn.-
Constructor Summary
ConstructorsConstructorDescriptionActionRequest(int turnNumber, SquadMember member, List<EntitiesAtLocation> locationsInView) Creates an instance of aActionRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelocationsInViewrecord component.member()Returns the value of thememberrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theturnNumberrecord component.
-
Constructor Details
-
ActionRequest
Creates an instance of aActionRequestrecord class.- Parameters:
turnNumber- the value for theturnNumberrecord componentmember- the value for thememberrecord componentlocationsInView- the value for thelocationsInViewrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
turnNumber
public int turnNumber()Returns the value of theturnNumberrecord component.- Returns:
- the value of the
turnNumberrecord component
-
member
-
locationsInView
Returns the value of thelocationsInViewrecord component.- Returns:
- the value of the
locationsInViewrecord component
-