| <david.weekly.org> | May 11 | 2008 | |
| code | othello v0.03 | ||
|
download othello source (35kb - Unix Gzipped Tar file) Linux Othello (16kb - RedHat i386 RPM) view changelog This program plays the classic board game Othello against you. Othello is played by two people (white and black) who take turns placing a single piece of their color on an 8x8 board. When a piece is placed in such a way as there exists a row (horizontal, diagnol, or vertical) of pieces of the opposite color capped on one side by your newly placed piece and on the other side by an existing piece of your color, the row of pieces are flipped over (Othello pieces are white on one side, black on the other). In fact, to make a move you must flip over at least one opposing piece. To illustrate, here is the opening Othello configuration: A B C D E F G H 1 2 3 4 * O 5 O * 6 7 8If * goes first, she must place her piece at E3, F4, C5, or D6. Let's show what happens if E3 is selected: A B C D E F G H 1 2 3 * 4 * * 5 O * 6 7 8The newly placed piece trapped the O piece at E4 between * pieces at E3 and E5 -- the piece was flipped and * is now winning the game. In this version of Othello, you play against the computer, which uses logic techniques to compute its best possible moves. It's surprising how well it plays for the simplicity of the code behind it... I hope you enjoy! Many improvements are planned (see TODO) and a web-based version is also in the works. Feel free to email me with your comments at david@weekly.org! | ||
| content & layout © copyright 1995-2008 -{ david e weekly }- | ||