The Moyoman program will assume a standard file structure under
the top-level directory, moyoman, which of course can be installed
anywhere on the file system. The following are the directories
immediately under the moyoman directory:
The src directory contains all of the source code for Moyoman, including
This directory contains all of the necessary third party jar files for running the
server, such as the Apache Xerces XML parser.
The doc directory contains all project documentation. Some of the
documentation consists of static files, while other documentation
is generated dynamically, such as the javadoc. The javadoc files are in
the subdirectory javadoc. In any case, load the
index.html file into your browser to view all documentation.
The config directory contains all of the configuration information for the
Moyoman server. These include information such as the default language
to use, which modules are used in a standard
configuration, and other parameters such as whether or not to
save the state of previous moves.
The data directory contains data used by the program such as joseki
dictionaries, and not user generated data such as game records. The
subdirectory structure under data corresponds with that under src.
So, the data for the org.moyoman.util.Zobrist class is in the file
There are a series of files in the messages directory
which correspond to different languages and countries, and enable
Moyoman to return messages that are appropriate for the user.
There is one properties file for each language specification.
The file name would be of the form messages_de_DE.properties, where the first part
is an ISO-639 language name and the second part an ISO-3166 country
name, separated by an underscore. Some files may just have
the language part, such as de for German. The search would occur
as follows: if country and language are both specified, first
look for de_DE, if not found, then look for de. If that is not found,
then look for de_*, where * is some other country code. If that is not
found, then use the default lanaguage. If only language is specified, first look
for de. If that is not found, look for a file name starting with
de_. If there is more than one, the one chosen is undefined.
Finally, if there are no file names starting with de_ then just
use the default language.
Each language file contains a list
of properties with the same names. The name of each message is the same
regardless of the language; the value is the language specific message
that the user actually sees. For example, in the messages_en_US.properties file,
there might be a property called STATUS_PROMPT_ERROR with the string
"Illegal move. Enter another move." Each other language file would
have a property called STATUS_PROMPT_ERROR, but the associated string would
be appropriate for that language.
Moyoman would store any permanently saved games under this directory.
There is one subdirectory, called "Default". Under this directory,
there would be one subdirectory for each game saved with the name
of the game that is saved. The files under this game directory are
not human readable, but are meant to be reloaded by the Moyoman
program. The reason for the "Default" directory is that in the future,
Moyoman may have the concepts of users, and so the directories under
games would correspond to the different users, and the subdirectories of a
particular user would be the games saved. Currently, all games are stored
under "Default" for forward compatability.
This directory contains the saved state for all games that are in
progress. This information is used to restore games if the program
or computer crashes, and is also used if the user wants to take back
a move. The tmp_games directory contains one directory, "Default"
as mentioned in the discussion of the games directory. Under this
directory is one directory for each game which is in progress.
This directory contains all of the information that Moyoman would
need in order to restart a game.
Any logging information is written out here, for example, when a
game is started or stopped. Currently, there are five files,
debug, info, warning, error, and fatal.
The functionality for this may not be implemented for the first version,
but the idea is that the user can enter bugs through the client interface.
For each bug, there would be one file that would be written out to this
directory. The user would then be responsible for emailing the file along
with a description of the bug to the appropriate person.
Top level directory
Under the top level moyoman directory, there are a number of important
files. One of them, build.xml, is used by the ant program to perform
build tasks. Currently, the command: ant build will compile the source code,
ant will compile and create the Moyoman.jar file in the top level directory,
and: ant javadoc will generate the javadoc files in doc/javadoc.
The Moyoman.jar jar file is the executable. It can be run by double-clicking
it, or by typing: java -jar Moyoman.jar from the moyoman directory.