ActionResultLogger

public class ActionResultLogger implements Serializable, DeepEquatable

Logs the results for a single player.

Author:The Condor

Fields

actionresults

List<Map<Integer, ActionResult>> actionresults

Constructors

ActionResultLogger

public ActionResultLogger()

Methods

addActionResult

public void addActionResult(int stepNumber, ActionResult actionResult)

Insert an action result, overwriting any ActionResult for the same unit in the same round.

Parameters:
  • stepNumber
  • actionResult

addActionResult

public void addActionResult(int stepNumber, int unitID, ActionResult actionResult)

Insert an action result, overwriting any ActionResult for the same unit id in the same round.

Parameters:
  • stepNumber
  • unitID
  • actionResult

deepEquals

public boolean deepEquals(Object other)

equals

public boolean equals(Object obj)

getActionResults

public Map<Integer, ActionResult> getActionResults(int roundnumber)

Get the results of actions for a specific round.

Parameters:
  • roundnumber
Returns:

an unmodifiable list of ActionResults

getHighestRound

public int getHighestRound()

Get the number of the highest round for which this logger has recorded data.

Returns:The highest recorded round

hashCode

public int hashCode()