Class SmartPlayer

java.lang.Object
  extended bySmartPlayer
All Implemented Interfaces:
Player

public class SmartPlayer
extends java.lang.Object
implements Player

You must implement this SmartPlayer class for the PA3 assignment for comp440


Constructor Summary
SmartPlayer()
           
 
Method Summary
 java.awt.Point getMove(MineBoard map)
          This method will return a Point indicating the next move to make on the given MineBoard
 void lose()
          This method will be called when the player loses the Minesweeper game
 void win()
          This method will be called when the player wins the Minesweeper game
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmartPlayer

public SmartPlayer()
Method Detail

getMove

public java.awt.Point getMove(MineBoard map)
Description copied from interface: Player
This method will return a Point indicating the next move to make on the given MineBoard

Specified by:
getMove in interface Player
Parameters:
map - the MineBoard representing the current state of the Minesweeper game
Returns:
a Point indicating the next move to make; may be null indicating no move

win

public void win()
Description copied from interface: Player
This method will be called when the player wins the Minesweeper game

Specified by:
win in interface Player

lose

public void lose()
Description copied from interface: Player
This method will be called when the player loses the Minesweeper game

Specified by:
lose in interface Player