Class Parser

java.lang.Object
  extended by Parser

public class Parser
extends java.lang.Object


Constructor Summary
Parser()
           
 
Method Summary
static void displayResult(int retStatus)
          Displays the result of a shot fired.
static java.awt.Point getLocation()
          Gets a location from the user and returns it to the client.
static boolean placeOwnShips()
          Asks the user if he wants to place own ships.
static ShipList setupBoard()
          This method sets up the board.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser()
Method Detail

setupBoard

public static ShipList setupBoard()
This method sets up the board. It interacts with the user and gets the name of the ship and location etc,


getLocation

public static java.awt.Point getLocation()
Gets a location from the user and returns it to the client.

Returns:
a location object obtained from user.

placeOwnShips

public static boolean placeOwnShips()
Asks the user if he wants to place own ships.

Returns:
true if the user wants to place own ships.

displayResult

public static void displayResult(int retStatus)
Displays the result of a shot fired.

Parameters:
retStatus - the status of the shot fired.