RePast
v. 2.0

uchicago.src.sim.games
Class AntiTitForTat

java.lang.Object
  |
  +--uchicago.src.sim.games.AntiTitForTat
All Implemented Interfaces:
Strategy

public class AntiTitForTat
extends Object
implements Strategy


Method Summary
 GameChoice calculateMove(GameChoice opponentLastMove)
          Returns the opposite of the opponent's last move.
static AntiTitForTat getInstance()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static AntiTitForTat getInstance()

calculateMove

public GameChoice calculateMove(GameChoice opponentLastMove)
Returns the opposite of the opponent's last move. If opponent's last move is null as in the first move a game, then this returns GameChoice.DEFECT.

Specified by:
calculateMove in interface Strategy

toString

public String toString()
Overrides:
toString in class Object

RePast
v. 2.0

Bug reports and feature requests to RePast