Main Menu
Twitter

Anthraxx - A J2ME Ataxx MIDlet

Introduction

Ataxx is a board game invented in 1988. It was originally called Infection but is also known as Slime Wars, Frog Cloning and Boogers. The game was initially released on a host of popular home computers (the ZX Spectrum, the Commodore 64, the Amiga, etc) and, more surprisingly, also as an arcade game.
Two players, red and blue, alternate in placing pieces on a 7x7 board. A player places pieces on the board with the goal of capturing opposing pieces. The winner is the player who has the most pieces of their colour on the board at the end of the game.
Ataxx's original name, Infection, came from the manner in which pieces are captured: Any opposing piece touched by the most recently played piece is infected and changes colour. The name Ataxx indicates that to win, a player must go on the offensive.
The name Anthraxx tries to capture both the virulent and violent nature of this game.
For the full rules of Ataxx, more history and some pointers, visit Wikipedia.

Anthraxx

Anthraxx is a J2ME MIDlet that can be played on most new mobile phones. It has the following features:
  • Ten levels of skill ranging from very easy to very hard.
  • Has been tested on phones from Nokia, Motorola, Sony-Ericsson, Samsung and HTC.
  • Multi-language support (currently English, French, German, Danish and Portuguese).
  • Can be played with a stylus on phones with a touch-sensitive display.
  • Players can undo all previous moves.

The MIDlet can be downloaded from http://hammingweight.com/Anthraxx.jad.
If you want just the JAR (not the JAD) file, the URL is http://hammingweight.com/Anthraxx.jar.
You should type one of the above two URL's into your phone's browser to download the game. The first is the normal one to use but some phones (e.g. from HTC) don't appear to support the JAD format. The URL's are case-sensitive.

The Source Code and Documentation

The source code can be downloaded here. The current version of the software is version 1.16. The source code is released under version 2 of the GNU General Public License (GPL). The source archive contains the Java source code, the resource files and the terms of the GPL.
The source code has been (heavily) optimised for speed. In particular the code makes use of bit boards to speed up the analysis of positions. Bit boards are notorious for producing code that is difficult to read and debug. Consequently, I will be releasing documentation that will describe the code at a higher level of abstraction than the comments in the code. The documentation will cover:
  • The bit board representation used.
  • UML diagrams indicating the interaction of the classes (e.g. I use an MVC architecture to handle the display and to get moves from the user) .
  • The state machine/game loop and event processing.

Acknowledgements

I'd like to thank the following people:
  • Martin Wells for letting me modify his Locale class (from J2ME Game Programming).
  • Frederik Ipsen for the translations into Danish and Portuguese.
  • Pierre Lutayi for the translation into French.
  • Bernd Jendrissek for the German.