MAT 340 Project Site (Probability and Statistics)
These example demonstrate using the plugin (rule set) to create random game clients.
They are complete, stand-alone projects. The idea is that these clients will use the same interface
as a client using the real game server.
If you want to make the random drivers "intelligent", you only need to modify the GetNextMove function in the driver.
The driver code is heavily commented, so you should read through it to get an understanding of how to make modifications.
Tic-Tac-Toe
- TicTacToe.h (Text)
This simply has the Game structure defined. This is not strictly required for networked clients, as
they have no knowledge of the internal structures of the plugin. However, it can sometimes simplify testing if you have access
to the Game structure.
- TicTacToe.c (Text)
This is the implementation of the TicTacToe plugin. It's very simple, as most plugins will be, as its only technical complexity
is in verifying a move (via the ValidateMove function). Most simple board games with have a pretty straight-forward
implementation of this function.
- random-ttt.c (Text)
This is the driver that tests the plugin. It does not require a server or any networking. In fact, all plugins should be tested
with some kind of text-based driver before worrying about deploying it to the server.
Domineering
- Domineering.h (Text)
This simply has the Game structure defined.
- Domineering.c (Text)
This is the implementation of the Domineering plugin.
- random-dom.c (Text)
This is the driver that tests the plugin. It does not require a server or any networking.
Download all files needed for the Domineering client: random-dom.zip.
This includes a Makefile. Just extract all of the files to a directory and run make.