GNOME Bugzilla – Bug 379224
Extension to provide a second version of gtali
Last modified: 2006-12-10 20:28:18 UTC
I've hacked up a patch to gtali that in addition to playing the "Yahtzee (tm)" based game, it can also will play a "Kismet (tm)" style game. This is choosable via a preference or a command line option. For background on "Kismet (tm)" see: http://en.wikipedia.org/wiki/Kismet_%28dice_game%29 The short summary: the five dice have colored spots: 1 and 6 are black, 2 and 5 red, and 3 and 4 are green. This version has the same lower level categories, except it doesn't have small straight, but it adds three new categories: 2 pair same color, full house same color, and flush (all dice same color). There are other minor scoring differences (usually scores include total all dice, plus some possible bonus).
Created attachment 77133 [details] [review] Patch to current CVS snapshot This is just the code patch. It presumes the existence of new .svg files for dice in the "colors" version.
Created attachment 77134 [details] svg files containing dice pictures for Colors enhancement to gtali These are the dice images I made for the proposed enhancement.
Geoff wrote: >The known bug that still remains is that when I change games in preferences and >start a new game, >I continue using the old dice pictures. The game does play with the new scoring >and categories, >and if you restart gtali, it uses the "right" pictures. I tried a few things >yesterday to get it >to replace the old images with newer ones, but I was unable to get that working. Once this bug is fixed, the patch can be applied to CVS. Thanks for the effort, Geoff!
Created attachment 77273 [details] [review] Updated patch for new gtali version Updated the patch to fix dice images when the user changes the game in the middle. This also fixes a bug that would count a straight as a flush, but not a 5 of a kind.
Please update the changelog, and Makefiles as neccessary...
Created attachment 77404 [details] [review] Add Makefile and Changelog edits to gtali version patch Updated Makefiles and ChangeLog for installing the patch. Also improved computer's play in Colors mode. This patch lists the new icon files for dice in Colors mode, but those files themselves are in attachment #77134 [details].
Thanks for the update. I will test this patch again, and let you know...
Hello again Geoff, please update this patch to the latest CVS version again, and I will commit it to CVS. There have been some changes there since you wrote the patch.
Created attachment 78076 [details] [review] Merge patch with other changes recently committed to CVS
Now gtali crashes each time I run it: (gdb) run Starting program: /home/andreas/gnome/main/gnome-games/gtali/gtali Failed to read a valid object file image from memory. [Thread debugging using libthread_db enabled] [New Thread -1227130672 (LWP 29566)] Program received signal SIGSEGV, Segmentation fault.
+ Trace 93034
Thread NaN (LWP 29566)
Did you test the patch before submitting it??? This is not encouraging...
There is no gconf key "/apps/gtali/GameType"...
Created attachment 78098 [details] [review] Add new value to gtali.schemas.in, and check for NULL pointer from gconf_client_get_string This patch (I hope) fixes the crash Andreas was seeing. I still haven't reproduced the crash myself, but this does define the new gconf setting, and it also guards against gconf returning NULL for the value.