Source-Changes-HG archive

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

[src/trunk]: src/games/gomoku gomoku: document where to fix the unnecessarily...



details:   https://anonhg.NetBSD.org/src/rev/8ae4b5c38b6b
branches:  trunk
changeset: 366497:8ae4b5c38b6b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun May 29 10:06:43 2022 +0000

description:
gomoku: document where to fix the unnecessarily long thinking time

diffstat:

 games/gomoku/pickmove.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (43 lines):

diff -r 839245f8e3ce -r 8ae4b5c38b6b games/gomoku/pickmove.c
--- a/games/gomoku/pickmove.c   Sun May 29 08:15:47 2022 +0000
+++ b/games/gomoku/pickmove.c   Sun May 29 10:06:43 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pickmove.c,v 1.51 2022/05/29 01:17:55 rillig Exp $     */
+/*     $NetBSD: pickmove.c,v 1.52 2022/05/29 10:06:43 rillig Exp $     */
 
 /*
  * Copyright (c) 1994
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 /*     @(#)pickmove.c  8.2 (Berkeley) 5/3/95   */
-__RCSID("$NetBSD: pickmove.c,v 1.51 2022/05/29 01:17:55 rillig Exp $");
+__RCSID("$NetBSD: pickmove.c,v 1.52 2022/05/29 10:06:43 rillig Exp $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -107,6 +107,12 @@
 
        /* compute new values */
        nextcolor = us;
+       /*
+        * TODO: Scanning for both frames misses that after loading the game
+        *  K10 J9 M10 J10 O10 J11 Q10 J8 and playing K9, there are 2
+        *  immediate winning moves J12 and J7. Finding the winning move
+        *  takes too long.
+        */
        scanframes(BLACK);
        scanframes(WHITE);
 
@@ -242,11 +248,6 @@
                return;
 
        /* quick check for four in a row */
-       /*
-        * TODO: This quick check misses that after loading the game K10 J9
-        *  M10 J10 O10 J11 Q10 J8 and playing K9, there are 2 immediate
-        *  winning moves J12 and J7.
-        */
        sp = &board[cbp->c_vertex];
        cb.s = sp->s_fval[color][cbp->c_dir].s;
        if (cb.s < 0x101) {



Home | Main Index | Thread Index | Old Index