uchicago.src.sim.games
Class TitForTat
java.lang.Object
|
+--uchicago.src.sim.games.TitForTat
- All Implemented Interfaces:
- Strategy
- public class TitForTat
- extends Object
- implements Strategy
getInstance
public static TitForTat getInstance()
calculateMove
public GameChoice calculateMove(GameChoice opponentLastMove)
- Returns the opponent's last move. If opponent's last move was
null as in the first move of the game, then this returns
GameChoice.COOPERATE.
- Specified by:
calculateMove in interface Strategy
toString
public String toString()
- Overrides:
toString in class Object
Bug reports and feature requests to RePast