NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/58828: Fish allows guesses that are not in the player's hand.



The following reply was made to PR bin/58828; it has been noted by GNATS.

From: aran%100acres.us@localhost
To: gnats-bugs%netbsd.org@localhost, gnats-admin%NetBSD.org@localhost
Cc: netbsd-bugs%netbsd.org@localhost, aran%100acres.us@localhost
Subject: Re: bin/58828: Fish allows guesses that are not in the player's
 hand.
Date: Mon, 18 Nov 2024 08:18:13 -0800 (PST)

 Harold,
 
 You are correct, it should be at most 3.  I didn't test that, just the stealing
 of cards.  Good catch.  I made the change locally and it prevents me from asking
 about cards from completed books.  Here is the updated patch:
 
 
 Index: fish.c
 ===================================================================
 RCS file: /cvsroot/src/games/fish/fish.c,v
 retrieving revision 1.27
 diff -u -r1.27 fish.c
 --- fish.c      25 Jul 2021 02:00:42 -0000      1.27
 +++ fish.c      18 Nov 2024 16:17:32 -0000
 @@ -188,7 +188,7 @@
                         continue;
                 }
                 n = p - cards;
 -               if (userhand[n] <= 3) {
 +               if (1 <= userhand[n] && userhand[n] <= 3) {
                         userasked[n] = 1;
                         return(n);
                 }
 
 
 Aran 
 
 
 > The following reply was made to PR bin/58828; it has been noted by GNATS.
 > 
 > From: Harold Gutch <logix%foobar.franken.de@localhost>
 > To: gnats-bugs%netbsd.org@localhost
 > Cc: 
 > Subject: Re: bin/58828: Fish allows guesses that are not in the player's hand.
 > Date: Mon, 18 Nov 2024 10:51:53 +0100
 > 
 >  Hi,
 >  
 >  On Sun, Nov 17, 2024 at 07:25:00PM +0000, aran%100acres.us@localhost wrote:
 >  > --- fish.c      25 Jul 2021 02:00:42 -0000      1.27
 >  > +++ fish.c      17 Nov 2024 19:13:00 -0000
 >  > @@ -188,7 +188,7 @@
 >  >                         continue;
 >  >                 }
 >  >                 n = p - cards;
 >  > -               if (userhand[n] <= 3) {
 >  > +               if (1 <= userhand[n] && userhand[n] <= 4) {
 >  
 >  Without having tested this - is this correct or should this actually
 >  say "<= 3" at the end?  Otherwise you can again guess cards where you
 >  have the whole book, i.e., what the 2018 change (that introduced this
 >  bug) wanted to prevent.
 >  
 >  
 >    Harold
 >  
 


Home | Main Index | Thread Index | Old Index