Module Name:    src
Committed By:   rillig
Date:           Sun May 29 10:06:43 UTC 2022

Modified Files:
        src/games/gomoku: pickmove.c

Log Message:
gomoku: document where to fix the unnecessarily long thinking time


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/games/gomoku/pickmove.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/gomoku/pickmove.c
diff -u src/games/gomoku/pickmove.c:1.51 src/games/gomoku/pickmove.c:1.52
--- src/games/gomoku/pickmove.c:1.51	Sun May 29 01:17:55 2022
+++ src/games/gomoku/pickmove.c	Sun May 29 10:06:43 2022
@@ -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 @@ pickmove(int us)
 
 	/* 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 @@ scanframes(int color)
 		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) {

Reply via email to