net.bluebones.boggle
Class Round

java.lang.Object
  extended by net.bluebones.boggle.Round
All Implemented Interfaces:
Serializable

public class Round
extends Object
implements Serializable

Represents a round of Boggle as seen by the server.

Version:
0.3 $Revision: 1.3 $
Author:
Thomas David Baker
See Also:
Serialized Form

Constructor Summary
Round(Turn[] turns, char[][] letters)
          Initialises a round with the specified values.
 
Method Summary
static Round getTestRound()
          Gets a Round to be used in tests.
 Turn[] getTurns()
          Gets all the client turns that make up this round.
static void main(String[] args)
          A fairly simple test of Round that can be fired from the commandline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Round

public Round(Turn[] turns,
             char[][] letters)
      throws DictionaryUnavailableException
Initialises a round with the specified values.

Parameters:
turns - Client turns that are part of this round.
letters - Letters face up on the board this round.
Throws:
DictionaryUnavailableException - If not dictionary is available to validate words.
Method Detail

getTurns

public Turn[] getTurns()
Gets all the client turns that make up this round.

Returns:
Array of client turns.

getTestRound

public static Round getTestRound()
                          throws DictionaryUnavailableException,
                                 FileNotFoundException,
                                 IOException
Gets a Round to be used in tests. public so that tests in other classes can use it.

Returns:
Round
Throws:
DictionaryUnavailableException - If the dictionary is unavailable to higher level calls.
FileNotFoundException - If the dictionary file is missing initially.
IOException - If there is a problem reading the dictionary file initially.

main

public static void main(String[] args)
                 throws DictionaryUnavailableException,
                        RemoteException,
                        UnknownHostException,
                        FileNotFoundException,
                        IOException
A fairly simple test of Round that can be fired from the commandline.

Parameters:
args - Commandline arguments.
Throws:
DictionaryUnavailableException - If there is a problem with the dictionary.
RemoteException - If there is any problem setting up clients.
UnknownHostException - If clients cannot detect local ip.
FileNotFoundException
IOException