gnome-games r8076 - in trunk/gtali: . help/de
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8076 - in trunk/gtali: . help/de
- Date: Sat, 18 Oct 2008 07:15:26 +0000 (UTC)
Author: rancell
Date: Sat Oct 18 07:15:26 2008
New Revision: 8076
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8076&view=rev
Log:
Undoing 5 of a kind reduces the score by 50 as there might be multiple scores (Geoff Buchan, Bug #537673)
Modified:
trunk/gtali/help/de/.xml2po.mo
trunk/gtali/yahtzee.c
Modified: trunk/gtali/help/de/.xml2po.mo
==============================================================================
Binary files. No diff available.
Modified: trunk/gtali/yahtzee.c
==============================================================================
--- trunk/gtali/yahtzee.c (original)
+++ trunk/gtali/yahtzee.c Sat Oct 18 07:15:26 2008
@@ -136,7 +136,7 @@
NoDiceSelected (void)
{
int i, j = 1;
- for (i = 0; i < 5; i++)
+ for (i = 0; i < NUMBER_OF_DICE; i++)
if (DiceValues[i].sel)
j = 0;
return j;
@@ -146,7 +146,7 @@
SelectAllDice (void)
{
int i;
- for (i = 0; i < 5; i++)
+ for (i = 0; i < NUMBER_OF_DICE; i++)
DiceValues[i].sel = 1;
}
@@ -224,7 +224,7 @@
return;
}
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < NUMBER_OF_DICE; i++) {
if (DiceValues[i].sel) {
DiceValues[i].val = RollDie ();
DiceValues[i].sel = 0;
@@ -235,7 +235,7 @@
/* If no dice is selcted roll them all */
if(cnt == 0){
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < NUMBER_OF_DICE; i++) {
DiceValues[i].val = RollDie ();
lastRoll.DiceValues[i] = DiceValues[i].val;
}
@@ -323,7 +323,7 @@
num = 0;
- for (i = 0; i < 5; ++i)
+ for (i = 0; i < NUMBER_OF_DICE; ++i)
if (DiceValues[i].val == val)
++num;
@@ -335,7 +335,7 @@
{
int i;
- for (i = 0; i < 5; ++i) {
+ for (i = 0; i < NUMBER_OF_DICE; ++i) {
if (DiceValues[i].val == but_not)
continue;
@@ -387,7 +387,7 @@
val = 0;
- for (i = 0; i < 5; ++i)
+ for (i = 0; i < NUMBER_OF_DICE; ++i)
val += DiceValues[i].val;
return (val);
@@ -613,8 +613,14 @@
UndoLastMove() {
if (UndoList) {
UndoScoreElement *elem = UndoList->data;
- players[elem->player].score[elem->field] = 0;
- players[elem->player].used [elem->field] = 0;
+ if (elem->field == H_YA && game_type == GAME_YAHTZEE) {
+ if (players[elem->player].score[elem->field] != 0)
+ players[elem->player].score[elem->field] -= 50;
+ players[elem->player].used [elem->field] = players[elem->player].score[elem->field] > 0;
+ } else {
+ players[elem->player].score[elem->field] = 0;
+ players[elem->player].used [elem->field] = 0;
+ }
ResetDiceState(elem);
UndoList = g_list_remove(UndoList, elem);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]