|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSmarterCPUPlayer
public class SmarterCPUPlayer
SmarterCPUPlayer is a computer-controlled Player that uses a "smarter" strategy to choose which point to strike. You have great flexibility to choose a "smarter" strategy yourself.
| Constructor Summary | |
|---|---|
SmarterCPUPlayer()
|
|
| Method Summary | |
|---|---|
BoardPoint |
getNextMove()
Gets the next move this Player wants to execute. |
boolean |
isHuman()
Returns true if this Player is human. |
Ship |
placeOneShip()
This method will randomly place one ship. |
void |
setBoard(Grid grid)
Sets the board for this Player to the given Grid. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SmarterCPUPlayer()
| Method Detail |
|---|
public Ship placeOneShip()
placeOneShip in interface Playerpublic BoardPoint getNextMove()
Player
getNextMove in interface Playerpublic boolean isHuman()
Player
isHuman in interface Playerpublic void setBoard(Grid grid)
Player
setBoard in interface Playergrid - this Player's board.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||