Play Othello and view the Java source code to the program
The rules of Othello can be found here. Start the program by clicking the button that you find below if your browser handles Java (1.5 or later; can be downloaded from java.sun.com). Then click on the squares on the board to make a move or select "Change Sides" in the menu to make the program begin. Which playing level is most suitable depends on how fast your computer is, how fast your Java interpreter is, your patience and how strong opposition you want. A Pentium based PC running at 2-3 GHz can play at least at level 8. Lower level means the program plays faster.
This program, or actually the move engine, was translated by someone to the C language and can be found in the Linux KDE package with a completely different user interface.
If you have any comments you can mail me at ChessMobi@telia.com.
There is also a version of Othello for handheld devices (mobile phones with J2ME support):
You can download it to your phone (for free) at either http://www.luthman.nu/ if your phone uses WAP or at http://www.luthman.nu/mobile.html if you have an HTML browser in your phone. If you want to download it to your computer you need the two files Othello.jad and Othello.jar. From your computer you can then send them to your phone by cable, bluetooth, infrared transmission or whatever your phone, computer and software supports.
Here is the source code to the program:
The interesting thing with this program is, although it plays at considerable strength compared to most humans, that the algorithms are really very simple. You can also have a look at the javadoc documentation. The code is quite old now and neither does it follow the Java naming convetions nor is it documented in as much detail I think code should be but I don't think it will be very hard to understand.
These are the classes that handle the board. It is only the interfaces to the two very simple classes Score and Move and the slightly more complex class Game that you need to understand if you are only interested in studying the move engine.
This is the actual move engine:
These are interface classes for talking to the move engine:
These are the classes that handle the user interface:
The first eight classes go in the Othello.Engine package and the last two go in Othello.SwingFrame.
There are also a couple of property files that go in Othello.SwingFrame (the languages currently supported are English and Swedish):