After spending some time on the PC version of my Klaverjassen game, today I transferred the improvements to the mobile version, releasing version M3 (JAR, JAD). Basically, this means that it now features the still-dumb-but-not-quite-random AI of the PC version and improved game logic.
The user interface
Also, I wrote a new user interface. It is not perfect yet, but it looks pretty OK on my mobile phone’s QVGA (240×320) display. Smaller displays probably won’t work too well. Some screenshots (from the Sun Java mobile phone emulator):

Let me explain the UI. In the left-upper corner of the screen, the game number and the person starting in this game is shown. After every change in the situation of the game, the game pauses and one has to press a random key. For instance, this is after each card played by the computer, or after each play/pass decision.
In the left screenshot, the user (”Ik”) has to choose whether to play on clubs (”Klaveren” in Dutch), displayed just below the game number. In this case, I chose to play (by pressing the “3″ button of the phone — any other key would be passing), so “Wij op K” is displayed, meaning that we are playing on clubs.
Now, I choose to play the ace of spades by pressing the “4″ button. The other players also play some cards, and I win with 29 points, as shown in the right screenshot. And so on, and so on.
Changelog and technical details
Here is the changelog:
Milestone 3 (07-08-2008)
————————
Game logic:
* [FEATURE] Base play/pass decision on cards
* [FEATURE] Simple heuristic AI
* [FIX] Reset extra points counter after game
* [FIX] Rebuild of game class in pull based fashion
* [FIX] Don’t use Integer.compareTo(), @override in game logic
* [FIX] New trump can’t be the same as old one
* [FIX] Don’t use floating point numbers: not supported by CLDC 1.0
* [FEATURE] Added field showing first player in current showdown
User interface:
* [FEATURE] Brand new, graphical UI
The game, as far as I know, uses only CLDC 1.0 and MIDP 1.0 features, so it ought to work on any Java-enabled phone. I only tried it with resolutions of 240×320 and larger; smaller screens probably won’t work too well. I’d like to hear your comments!