|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soc.robot.MonopolyStrategy
public class MonopolyStrategy
Field Summary | |
---|---|
private SOCGame |
game
Our game |
protected int |
monopolyChoice
The resource we want to monopolize, chosen by decidePlayMonopoly() ,
such as SOCResourceConstants.CLAY
or SOCResourceConstants.SHEEP |
private SOCPlayer |
ourPlayerData
Our SOCRobotBrain 's player |
Constructor Summary | |
---|---|
MonopolyStrategy(SOCGame ga,
SOCPlayer pl)
Create a MonopolyStrategy for a SOCRobotBrain 's player. |
Method Summary | |
---|---|
boolean |
decidePlayMonopoly()
Decide whether we should play a monopoly card, and set getMonopolyChoice() if so. |
int |
getMonopolyChoice()
Get our monopoly choice; valid only after decidePlayMonopoly() returns true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final SOCGame game
private final SOCPlayer ourPlayerData
SOCRobotBrain
's player
protected int monopolyChoice
decidePlayMonopoly()
,
such as SOCResourceConstants.CLAY
or SOCResourceConstants.SHEEP
Constructor Detail |
---|
MonopolyStrategy(SOCGame ga, SOCPlayer pl)
SOCRobotBrain
's player.
ga
- Our gamepl
- Our player data in gaMethod Detail |
---|
public int getMonopolyChoice()
decidePlayMonopoly()
returns true.
SOCResourceConstants.CLAY
or SOCResourceConstants.SHEEP
public boolean decidePlayMonopoly()
getMonopolyChoice()
if so.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |