Preliminary Joggle Code: see also ~ola/cps108/joggle
Trie-based joggle player, this player (implementing old style JoggleFE) is lightning fast in Java!! once the words are read in.
- JoggleReader.java -- new reader that reads into a Trie
- JogglePlay.java -- new player constructed from Trie, finds all words on a board FAST
- Trie.java -- the Trie class
- JoggApp2.java -- simple app showing use (requires Proxy classes from above)
A faster joggle reader for the above trie version.
- FastJoggleReader.java -- uses an array of chars instead of a StringBuffer
- bogdict -- compressed dictionary for use by FastJoggleReader
The boggle dictionary as "coded" objects (i.e. compilable).
- BoggleDictionary.c -- in C/C++
- BoggleDictionary.java -- in Java (not tested)
Here's some Timer code that may be useful.
For your convenience, an example of how to use the above Timer. See my caveats on using Timers.
Writing a client
Here's (minimally) what you need to do to make a networkable Joggle:
- Write a front end (graphical or otherwise) that implements the
JoggleFE
interface (JoggleFE exists in packagejoggle.client
).- Instantiate a JoggleAL (also in package
joggle.client
), passing a hostname, playername, and the JoggleFE to the constructor.- Check to see if the connection succeeded by calling JoggleAL's method
connected()
.- If it returns true, call JoggleAL's method
playGame()
.JoggleAL now implements the JoggleController interface. Now you can create a "local" version of JoggleAL, and easily switch between the networked controller and your controller by accessing them through the JoggleController interface.
All the classes and interfaces mentioned above have their own javadoc pages.
Here is the source code to a simple text-based networked joggle client:
They are in a package called
jogglesyam
, so to compile and use them, they need to be in a directory calledjogglesyam
. Or just use the precompiled version as listed in "Using the server" below.Using the server (i.e. getting your client to run)
...has it's own page.