--------- README.txt --------- This code implements the internals of a game of Othello, a two-player boardgame where players place tiles on an 8x8 grid. Rules for Othello are taken from: http://www.centralconnector.com/games/othello.html My purpose in this exercise was not to write an excellent Othello-solving AI algorithm, but rather to write the infrastructure in a clean, extensible way. To that end, I have designed a system where developers could write their own algorithms and play them against each other. I have included a sample Strategy object with a simple algorithm for playing Othello, as an example and test case. There is no UI implemented in the base engine; that functionality would belong to clients of the package. There are four major objects in the Othello structure-- Moves, Boards, Games, and Strategies: * Moves are simple container classes that specify an attempted play-- color and position. (The Pass object is a subclass of Move.) * Boards maintain the state of pieces on the grid, and exports methods for checking validity of moves and playing moves. It handles all the relevant updates after a valid move is played. * Strategy objects (which implement the IStrategy interface) evaluate a Board object and determine a next move for the specified color. * The Game object handles logic of actual game play-- adding players, determining whether the game is over, asking the relevant player for the next move. It owns a Board, and two Strategy objects. Other files in the package: Constants.hh: A convenient place for putting some constants. TestHelper.hh: A few macros for test programs. BoardTest.cc: A set of unit tests for the methods of the Board class. GameTest.cc: A set of unit tests for the methods of the Game class. Makefile: for building the project test-output.txt: the output of "make all check" in a cleaned directory Note: This project was compiled and run under Mac OS X using GNU Make 3.81 and GCC 4.0.1. It was also compiled under GCC 3.4.6 on Red Hat. Both test programs were also run under valgrind 3.1.1 and exhibited no memory leaks. Possible improvements: * Functions/refactoring: . Logger functionality. And/or clean up the extraneous debug messages. . Move color information out of Constants and into its own class. . Add cloning functionality for Board. ---- Developed by Tom Giordano, September 2009.