Record Class GameOverActionOutcome
java.lang.Object
java.lang.Record
idlab.colonyops.model.events.GameOverActionOutcome
- Record Components:
missionEndedOnTurn- the last turn that was played: the state of the world at the end of this turn is the final state
- All Implemented Interfaces:
ActionOutcome
Outcome of the final
MissionEvent of a mission, reported (not caused by a squad
member's action) when the mission ends.
It is not about any entity of the world, so the event is exceptional in two ways:
MissionEvent.subjectEntityId()is the empty string andMissionEvent.subjectLocation()isLocation(0, 0): they are placeholders, which must not be looked up or acted on;MissionEvent.turnNumber()is the turn after the last completed one (missionEndedOnTurn + 1), so that logic which already has the state of the last turn (and so skips the events of that turn) does not miss this event.
-
Constructor Summary
ConstructorsConstructorDescriptionGameOverActionOutcome(int missionEndedOnTurn) Creates an instance of aGameOverActionOutcomerecord 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.intReturns the value of themissionEndedOnTurnrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GameOverActionOutcome
public GameOverActionOutcome(int missionEndedOnTurn) Creates an instance of aGameOverActionOutcomerecord class.- Parameters:
missionEndedOnTurn- the value for themissionEndedOnTurnrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
missionEndedOnTurn
public int missionEndedOnTurn()Returns the value of themissionEndedOnTurnrecord component.- Returns:
- the value of the
missionEndedOnTurnrecord component
-