from java.lang import Runnable from pd.PrisonersDilemmaActor.Action import COOPERATE, DEFECT class TitForTat(Runnable): def run(self): actor = self.actor result = actor.act(COOPERATE) while (actor.getGame().isRunning()): result = actor.act(result.otherPlayerAction)