Package: bsdgames
Version: 2.17-1sarge1
Severity: normal
Tags: patch

This is a resend of another message (see #185100 for the first one) that
seems to have gotten lost in the guts of the BTS. It's been a week and I
haven't seen a bounce or a confirmation. I did get the original Bcc sent by
reportbug...

About a week ago, I wrote:
>Package: bsdgames
>Version: 2.17-1sarge1
>Severity: normal
>Tags: patch
>
>Backgammon has a bug when playing human vs. computer, where sometimes, near
>the end of the game as the computer player is removing his pieces from the
>board, it will fail to make a move. The computer player basically skips a
>turn.
>
>This bug is present in the oldest version of backgammon that I was able to
>find, posted to comp.sources.games in 1988, carrying the version information
>"Last updated on Saturday, January 11, 1986."
>
>For easy reproduction, here's a savegame which demonstrates the problem. In
>the saved position, the computer is playing White and has just rolled a 2 and
>a 1. There are 5 white men off the board and 10 on his inner table. When you
>run "backgammon nomovetest" you will see "White rolls 2 1 and moves 2-0,1-0"
>but none of the pieces actually move. There are still 10 white pieces on the
>board and it has become Red's turn.
>
>One obstacle: the savegame format is not portable. It's just an array of
>ints. So I'm including two versions of nomovetest. The first one is 32-bit
>ints with MSB first. The second one is 32-bit ints with LSB first.
>
>begin 600 nomovetest
>M`````/[EMAIL PROTECTED]
>M``````````````````````````````````````````````(````"`````P``
>M`````````````0`````````%````!P````H````([EMAIL PROTECTED]'_________
>5______\````!`````0````(`````
>`
>end
>
>begin 600 nomovetest
>M`````/_____Y____````````````````_O___P``````````````````````
>M``````````````````````````````````````````(````"`````P``````
>M`````````0`````````%````!P````H````([EMAIL PROTECTED]
>5______\!`````0````(`````````
>`
>end
>
>This patch fixes the problem. I'm also throwing in a couple of fixes for bad
>English grammar in the tutorial text.
>
>diff -ruN --exclude '*.o' bsdgames-2.17.orig/backgammon/backgammon/move.c 
>bsdgames-2.17/backgammon/backgammon/move.c
>--- bsdgames-2.17.orig/backgammon/backgammon/move.c    2004-01-27 
>15:52:07.000000000 -0500
>+++ bsdgames-2.17/backgammon/backgammon/move.c 2006-05-13 16:37:39.000000000 
>-0500
>@@ -152,6 +152,9 @@
>       trymove(0, 0);
>       pickmove();
> 
>+      if (d0)
>+              swap;
>+
>       /* print move */
>       writel(" and moves ");
>       for (i = 0; i < mvlim; i++) {
>diff -ruN --exclude '*.o' bsdgames-2.17.orig/backgammon/teachgammon/ttext1.c 
>bsdgames-2.17/backgammon/teachgammon/ttext1.c
>--- bsdgames-2.17.orig/backgammon/teachgammon/ttext1.c 2003-12-16 
>21:47:37.000000000 -0500
>+++ bsdgames-2.17/backgammon/teachgammon/ttext1.c      2006-05-13 
>16:43:27.000000000 -0500
>@@ -94,7 +94,7 @@
>       "\n   Although not indicated on the board, the players' homes are",
>       "located just to the right of the board.  A player's men are placed",
>       "there when they are removed from the board.  The board you just",
>-      "saw was in it's initial position.  All games start with the board",
>+      "saw was in its initial position.  All games start with the board",
>       "looking like this.  Notice that red's pieces are represented by the",
>       "letter 'r' and white's pieces are represented by the letter 'w'.",
>       "Also, a position may have zero or more pieces on it, e.g.  posi-",
>diff -ruN --exclude '*.o' bsdgames-2.17.orig/backgammon/teachgammon/ttext2.c 
>bsdgames-2.17/backgammon/teachgammon/ttext2.c
>--- bsdgames-2.17.orig/backgammon/teachgammon/ttext2.c 2003-12-16 
>21:47:37.000000000 -0500
>+++ bsdgames-2.17/backgammon/teachgammon/ttext2.c      2006-05-13 
>16:54:41.000000000 -0500
>@@ -65,7 +65,7 @@
>       "points in a row) are difficult to form, many points nestled close-",
>       "ly together produce a formidable barrier.  Also, while it is good",
>       "to move back men forward, doing so lessens the opportunity for you",
>-      "to hit men.  Finally, remember that once the two player's have",
>+      "to hit men.  Finally, remember that once the two players have",
>       "passed each other on the board, there is no chance of either team",
>       "being hit, so the game reduces to a race off the board.  Addi-",
>       "tional hints on strategy are presented in the practice game.",
>
>-- System Information:
>Debian Release: 3.1
>Architecture: powerpc (ppc)
>Kernel: Linux 2.6.11-powerpc
>Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
>
>Versions of packages bsdgames depends on:
>ii  libc6                 2.3.2.ds1-22sarge3 GNU C Library: Shared libraries an
>ii  libgcc1               1:3.4.3-13         GCC support library
>ii  libncurses5           5.4-4              Shared libraries for terminal hand
>ii  libstdc++5            1:3.3.5-13         The GNU Standard C++ Library v3
>ii  wamerican [wordlist]  5-4                American English dictionary words 
>ii  wbritish [wordlist]   5-4                British English dictionary words f
>ii  wenglish              5-4                American English dictionary words 
>
>-- no debconf information
>



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to