Index:
[thread]
[date]
[subject]
[author]
From: Jason Grosland <jcg3@cs.duke.edu>
To :
Date: Tue, 23 Mar 1999 22:15:15 -0500
Re: pig
On Tue, 23 Mar 1999, Carl Knerr wrote:
> I may be mistaken but it seems that in order to implement a "strategy" we
> need to make something similar to the example code in PigGame.java, not
> PigPlayer.java. Am I understanding this correct?
Not so... If you write your own subclass of PigPlayer, you can write
playRound() with whatever code you want. Maybe you want your player to
play less aggressively as its score gets higher. Or maybe you want to
always keep rolling until you win. Or maybe you like SimplePlayer's
strategy-- roll once and only once every turn.
You might want to write something like PigGame if you want to play your
Players against each other, or to give your Players a more accurate test
of a game of Pig.
...jason
- By all means, think outside of the box. -
- Just put everything back when you're done. -
Index:
[thread]
[date]
[subject]
[author]