• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Games
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by fml2 - 2007-01-05
Last edited by dionoea - 2007-06-30

FS#6509 - Plugin for playing reversi game

Since I like the game but mostly as an exercise in programming RB, I’ve coded up the plugin for reversi game. It should work on all targets with a bitmap display.

As moves are made, they are stored in the game history so that it’s possible to save the track. It should be also possible to choose the playing strategy for each player.


- Really implement the automatic playing strategies (take them from hinversi?)
- Implement loading/saving a game from/to a file
- Implement robot players (provisions are made but the main loop should be adjusted)
- Make nicer GUI - …

Anyone interested?

The contents of the ZIP file should be placed to the ‘plugins’ directory, and the patch should also be applied.

Closed by  dionoea
2007-06-30 20:05
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Applied. Thanks.

This works fine on my h140, but on the gigabeat I don’t get any black pieces and as a result cannot make a move with the white pieces. Any idea what is going on? Cheers

fml2 commented on 2007-01-16 08:12
Any idea what is going on?

No ideas on my side. I’ve only tested this on my H120 and with the simulator for ipod video (IIRC). Is it a problem with drawing (i.e. the internal game state is ok) or is the game itself is broken? In the former case I would blame gigabeat LCD driver or its graphics routines. Or maybe the GUI code of the plugin. In the latter case… I don’t know, I hope it’s not the latter case since the game logic is not platform specific.

BTW, there’s a typo in this task’s subject. It should read ‘plugin’, not ‘pluging.’

fml2 commented on 2007-01-16 16:01

From SVN log: 16 Jan 14:58 Fix inversevid mono drawing. Does this also fix the problem with the plugin on gigabeat?

No, still the same. No black pieces. Not be able to make any move as a result. Nothing happens when I select “Pass the move” in the menu either.

Does this still have problems on the Gigabeat?

I just tried this on my ipod, and got the same problem roolku reported on the gigabeat - no black pieces.

The problem is the definition of struct reversi_board_t - it uses a plain “char” type, which on ARM platforms is unsigned (the C language allows “char” to be either signed or unsigned, depending on the platform). Changing this to an explicit “signed char” type fixes the bug.

But it’s looking good so far.

Unfortunately yes. It works in the simulator, but not on target (see attachment). And like I said it is curious that the black square on the top left is there, so it doesn’t seem to be just a drawing problem.

fml2 commented on 2007-01-29 08:35
Changing this to an explicit “signed char” type fixes the bug.

Me being silly. Sure! Thanks Dave!

fml2 commented on 2007-02-17 21:07

Updated the patch:

- implemented Dave’s idea
- better graphics (now also works with vertical displays)

fml2 commented on 2007-02-18 10:13

More improvements:

  1. removed unneeded #define’s
  2. thicker cell lines on large displays


Available keyboard shortcuts


Task Details

Task Editing