Class Cell

java.lang.Object
  extended by Cell

public class Cell
extends java.lang.Object


Constructor Summary
Cell()
          Default constructor.
 
Method Summary
 boolean getIsHit()
          returns whether this cell has been hit.
 Ship getShipOnCell()
          returns the instance of the ship on this cell.
 void setIsHit(boolean value)
          Marks this cell as hit if flag is true.
 void setShipOnCell(Ship aShip)
          sets an instance of ship on this cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cell

public Cell()
Default constructor.

Method Detail

setShipOnCell

public void setShipOnCell(Ship aShip)
sets an instance of ship on this cell.

Parameters:
aShip - the instance of ship.

setIsHit

public void setIsHit(boolean value)
Marks this cell as hit if flag is true.

Parameters:
value - true signifies that cell has been hit.

getIsHit

public boolean getIsHit()
returns whether this cell has been hit.

Returns:
true if cell is hit, false otherwise

getShipOnCell

public Ship getShipOnCell()
returns the instance of the ship on this cell.

Returns:
the instance of the ship.