After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 379224 - Extension to provide a second version of gtali
Extension to provide a second version of gtali
Status: RESOLVED WONTFIX
Product: gnome-games-superseded
Classification: Deprecated
Component: gtali
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-25 18:03 UTC by Geoff Buchan
Modified: 2006-12-10 20:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Patch to current CVS snapshot (23.86 KB, patch)
2006-11-25 18:04 UTC, Geoff Buchan
none Details | Review
svg files containing dice pictures for Colors enhancement to gtali (3.55 KB, application/x-compressed-tar)
2006-11-25 18:07 UTC, Geoff Buchan
  Details
Updated patch for new gtali version (26.69 KB, patch)
2006-11-28 04:26 UTC, Geoff Buchan
none Details | Review
Add Makefile and Changelog edits to gtali version patch (33.22 KB, patch)
2006-11-30 08:03 UTC, Geoff Buchan
none Details | Review
Merge patch with other changes recently committed to CVS (34.28 KB, patch)
2006-12-10 13:53 UTC, Geoff Buchan
needs-work Details | Review
Add new value to gtali.schemas.in, and check for NULL pointer from gconf_client_get_string (35.03 KB, patch)
2006-12-10 20:28 UTC, Geoff Buchan
none Details | Review

Description Geoff Buchan 2006-11-25 18:03:26 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).
Comment 1 Geoff Buchan 2006-11-25 18:04:45 UTC
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.
Comment 2 Geoff Buchan 2006-11-25 18:07:32 UTC
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.
Comment 3 Andreas Røsdal 2006-11-26 16:24:23 UTC
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!
Comment 4 Geoff Buchan 2006-11-28 04:26:45 UTC
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.
Comment 5 Andreas Røsdal 2006-11-28 20:41:00 UTC
Please update the changelog, and Makefiles as neccessary...
Comment 6 Geoff Buchan 2006-11-30 08:03:08 UTC
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].
Comment 7 Andreas Røsdal 2006-11-30 18:31:48 UTC
Thanks for the update. I will test this patch again, and let you know...
Comment 8 Andreas Røsdal 2006-12-09 12:25:21 UTC
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.
Comment 9 Geoff Buchan 2006-12-10 13:53:14 UTC
Created attachment 78076 [details] [review]
Merge patch with other changes recently committed to CVS
Comment 10 Andreas Røsdal 2006-12-10 14:09:50 UTC
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.

Thread NaN (LWP 29566)

  • #0 strcmp
    from /lib/libc.so.6
  • #1 game_type_from_string
    at setup.c line 81
  • #2 main
    at gyahtzee.c line 810



Did you test the patch before submitting it??? This is not encouraging...
Comment 11 Andreas Røsdal 2006-12-10 14:23:21 UTC
There is no gconf key "/apps/gtali/GameType"...
Comment 12 Geoff Buchan 2006-12-10 20:28:18 UTC
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.