net.bluebones.boggle
Class Boggle

java.lang.Object
  extended by net.bluebones.boggle.Boggle

public class Boggle
extends Object

Main class for a network-aware, computerised version of Boggle. Class to be run on each client machine. RMI registry is started automatically on every machine to do network comms.

$ java net.bluebones.boggle.Boggle.

Version:
0.3 $Revision: 1.3 $
Author:
Thomas David Baker

Field Summary
static boolean DEBUG
          Whether the game is in "debug" mode or not (will print messages to stdout).
static String DICT_PATH
          Path to the dictionary.
static Dictionary dictionary
          Dictionary that provides the list of acceptable words.
static int timeInSecs
          Number of seconds the timer will count down during a game.
 
Method Summary
static boolean[][] copy(boolean[][] orig)
          Copies a boolean[][].
static void debug()
          Writes a blank line to stdout if in debug mode.
static void debug(char c)
          Writes the specified char to stdout if in debug mode.
static void debug(String msg)
          Writes the specified message to stdout if in debug mode.
static void debugBoard(char[][] letters)
          Prints a text representation of the specified letters if in debug mode.
static void main(String[] args)
          Initialises the application.
static void problem(String msg)
          Displays the specified error message to the user.
static void setTotalDice(int totalDice)
          Set the number of dice being used on this machine.
static int sideLength()
          The number of dice along one side of the board.
static int totalDice()
          The total number of dice on the board.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeInSecs

public static int timeInSecs
Number of seconds the timer will count down during a game.


DEBUG

public static final boolean DEBUG
Whether the game is in "debug" mode or not (will print messages to stdout).

See Also:
Constant Field Values

DICT_PATH

public static final String DICT_PATH
Path to the dictionary.

See Also:
Constant Field Values

dictionary

public static Dictionary dictionary
Dictionary that provides the list of acceptable words.

Method Detail

main

public static void main(String[] args)
Initialises the application.

Parameters:
args - Commandline arguments.

totalDice

public static final int totalDice()
The total number of dice on the board.


sideLength

public static final int sideLength()
The number of dice along one side of the board.


setTotalDice

public static void setTotalDice(int totalDice)
Set the number of dice being used on this machine.


problem

public static void problem(String msg)
Displays the specified error message to the user.

Parameters:
msg - Message to display.

debug

public static void debug(String msg)
Writes the specified message to stdout if in debug mode. A line separator is appended.

Parameters:
msg - Message to write.

debug

public static void debug()
Writes a blank line to stdout if in debug mode.


debug

public static void debug(char c)
Writes the specified char to stdout if in debug mode. No line separator is appended.

Parameters:
c - Message to write.

debugBoard

public static void debugBoard(char[][] letters)
Prints a text representation of the specified letters if in debug mode.

Parameters:
letters - Letters to print.

copy

public static boolean[][] copy(boolean[][] orig)
Copies a boolean[][].

Parameters:
orig - boolean[][] to copy.
Returns:
A copy of orig.