ActionLogger

public class ActionLogger implements Serializable, DeepEquatable

Logs the s for a single player.

Author:The Condor

Fields

actions

List<Map<Integer, Action>> actions

Constructors

ActionLogger

public ActionLogger()

Methods

addAction

public void addAction(int stepNumber, Action action)

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

Parameters:
  • stepNumber
  • action

addAction

public void addAction(int stepNumber, int unitID, Action action)

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

Parameters:
  • stepNumber
  • unitID
  • action

deepEquals

public boolean deepEquals(Object other)

equals

public boolean equals(Object obj)

getActions

public Map<Integer, Action> getActions(int roundnumber)

Get the s of actions for a specific round.

Parameters:
  • roundnumber
Returns:

an unmodifiable list of Actions

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()