Class Porky

java.lang.Object
  extended by Player
      extended by Porky

public class Porky
extends Player

Porky is a concrete class extending Player and always cooperating


Constructor Summary
Porky()
          Constructor loads an image and sets the name
 
Method Summary
 char play(char[] history)
          To instantiate a player this method must be implemented.
 
Methods inherited from class Player
getImage, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Porky

public Porky()
Constructor loads an image and sets the name

Method Detail

play

public char play(char[] history)
To instantiate a player this method must be implemented. How will the player choose if the previous (up to) 3 moves of the opponent against me are given?

Specified by:
play in class Player
Parameters:
history - An array of up to 3 previous plays by my opponent IS IGNORED
Returns:
always return 'c'