Reversi

Screenshot of a peculiar game position

I created this program as course work for the course Programming Project in spring 2002. It's one of my earliest Java programs.

Some of my favourite highlights about the program:

  • 4 different levels of computer players.
  • Flexibility in choosing opponents: either player can be human or any level of computer player. Can play different levels of AI against each other and watch. :)
  • The AI is very tough. Just try beating the Expert (consistently >50% of games...)!
  • The AI is non-deterministic: each level has a certain chance of selecting some other move than the best one. For Expert level this is 10%. Because of this, it's not possible to repeat a same game over and over.
  • Programming technique. The board is implemented as a JTable component. There is only one class for the Board, that is also used by the AI. This class implements TableModel, so its easy to get the visual JTable component to show the board. The human players act as Controller components for the board, so the program is actually a very neat implementation of MVC-architecture long before I even knew what it is.
Play the game!