Prisoner's dilemma game, to practice with Java and Scala