org.tiling.game.prisonersdilemma.strategy
Class TitForTat

java.lang.Object
  |
  +--org.tiling.game.Player
        |
        +--org.tiling.game.prisonersdilemma.PrisonersDilemmaPlayer
              |
              +--org.tiling.game.prisonersdilemma.strategy.TitForTat
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, PrisonersDilemmaMoves, java.io.Serializable, Strategy

public class TitForTat
extends PrisonersDilemmaPlayer

See Also:
Serialized Form

Fields inherited from interface org.tiling.game.prisonersdilemma.PrisonersDilemmaMoves
C, D
 
Constructor Summary
TitForTat()
           
 
Method Summary
 Move generateFirstMove()
           
 Move generateMove(Move ownLastMove, Move opponentsLastMove)
           
 java.lang.String getDescription()
           
 
Methods inherited from class org.tiling.game.prisonersdilemma.PrisonersDilemmaPlayer
generateMove, instantiate
 
Methods inherited from class org.tiling.game.Player
addScore, clone, compareTo, getGamesPlayed, getMeanScore, getScore, incrementGamesPlayed, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TitForTat

public TitForTat()
Method Detail

generateFirstMove

public Move generateFirstMove()
Specified by:
generateFirstMove in class PrisonersDilemmaPlayer

generateMove

public Move generateMove(Move ownLastMove,
                         Move opponentsLastMove)
Specified by:
generateMove in class PrisonersDilemmaPlayer

getDescription

public java.lang.String getDescription()