Shooting the moon with the bonus diamond results in incorrect scoring

Bug #114893 reported by Emmet Hikory
4
Affects Status Importance Assigned to Milestone
gnome-hearts (Debian)
Fix Released
Unknown
gnome-hearts (Ubuntu)
Fix Released
Wishlist
Emmet Hikory

Bug Description

Binary package hint: gnome-hearts

When playing under the Omnibus or Omnibus alternative ruleset, taking all the cards results in a score of -16, rather than the expected -36. Either this should be documented in the help file (replace "You do not need to take this card when you "shoot the moon" with "Taking this card while shooting the moon will increase your score by 10 points instead of decreasing your score"), or the score calculation should be adjusted (near line 264 of hearts.c) such that the score is reduced by 26 or 36 points, dependent on the presence of the appropriate card. Perhaps something like:

if (player[i]->point_cards == 14 && player[i]->score_round == 26)
    player[i]->score_total -= player[i]->score_round;
else if (player[i]->point_cards == 14 && player[i]->score_round == 16)
    player[i]->score_total -= 36; /* shot with the bonus */
else
    player[i]->score_total += player[i]->score_round;

Tags: bitesize
Emmet Hikory (persia)
Changed in gnome-hearts:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Stijn Polfliet (stijn-polfliet) wrote :

As a newbie, this seems like a nice bug to fix.
I know basics about packaging, patching and C.
Could you give me some more advice. I would love to help fixing this bug, it would be my first one!!

Revision history for this message
Emmet Hikory (persia) wrote :

Assigning to Stijn Polfliet who has declared the desire to work on this via email.

Changed in gnome-hearts:
assignee: nobody → stijn-polfliet
status: Confirmed → In Progress
Revision history for this message
Stijn Polfliet (stijn-polfliet) wrote :

Corrected the score calculation for Omnibus and Omnibus alternative ruleset.
The attached debdiff applies 02_correct_score.patch to address this issue.

Revision history for this message
Stijn Polfliet (stijn-polfliet) wrote :

Reviewed debdiff
See changelog

Revision history for this message
Stijn Polfliet (stijn-polfliet) wrote :

Final debdiff
interdiff had to be installed

Revision history for this message
Emmet Hikory (persia) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 22 May 2007 21:19:07 +0200
Source: gnome-hearts
Binary: gnome-hearts
Architecture: source
Version: 0.1.3-3ubuntu1
Distribution: feisty
Urgency: low
Maintainer: Ubuntu MOTU Developers <email address hidden>
Changed-By: Stijn Polfliet <email address hidden>
Description:
 gnome-hearts - The classic hearts card game for the GNOME desktop
Changes:
 gnome-hearts (0.1.3-3ubuntu1) feisty; urgency=low
 .
   * Corrected the score calculation for Omnibus and Omnibus alternative ruleset (LP: 114893)
   * Changed Maintainer field, added XSBC-Original-Maintainer field
Files:
 933db2881beae542db6a2d040c552b16 1049 games optional gnome-hearts_0.1.3-3ubuntu1.dsc
 551e4b172e189e7878e5f836fbe96c29 198635 games optional gnome-hearts_0.1.3-3ubuntu1.diff.gz
Original-Maintainer: Sander Marechal <email address hidden>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGVHxg58vd3QD9QFcRArtiAKDDSdqqVjUE9h9UPu5yy4xrW/HmUwCfbVo1
Zh6V+JC1TxVCaqDesggIeHc=
=Dq0y
-----END PGP SIGNATURE-----

Changed in gnome-hearts:
assignee: stijn-polfliet → persia
status: In Progress → Fix Committed
Changed in gnome-hearts:
status: Fix Committed → Fix Released
Revision history for this message
Emmet Hikory (persia) wrote :

It's still not built. See the "Builds" section of https://launchpad.net/ubuntu/gutsy/+source/gnome-hearts/0.1.3-3ubuntu1. All Build entries should be Completed Successfully prior to setting "Fix Released", as othewise it won't be delivered to users's systems.

Changed in gnome-hearts:
status: Fix Released → Fix Committed
Revision history for this message
Stijn Polfliet (stijn-polfliet) wrote : Re: [Bug 114893] Re: Shooting the moon with the bonus diamond results in incorrect scoring

sorry, I misunderstood that

On 5/23/07, Emmet Hikory <email address hidden> wrote:
> It's still not built. See the "Builds" section of
> https://launchpad.net/ubuntu/gutsy/+source/gnome-hearts/0.1.3-3ubuntu1.
> All Build entries should be Completed Successfully prior to setting "Fix
> Released", as othewise it won't be delivered to users's systems.
>
> ** Changed in: gnome-hearts (Ubuntu)
> Status: Fix Released => Fix Committed
>
> --
> Shooting the moon with the bonus diamond results in incorrect scoring
> https://bugs.launchpad.net/bugs/114893
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Changed in gnome-hearts:
status: Fix Committed → Fix Released
Changed in gnome-hearts:
status: Unknown → Confirmed
Changed in gnome-hearts:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.