Module Name:    src
Committed By:   rillig
Date:           Fri May 20 19:30:17 UTC 2022

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

Log Message:
gomoku: fix spelling and grammar in comments


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/games/gomoku/gomoku.h
cvs rdiff -u -r1.38 -r1.39 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/gomoku.h
diff -u src/games/gomoku/gomoku.h:1.30 src/games/gomoku/gomoku.h:1.31
--- src/games/gomoku/gomoku.h:1.30	Thu May 19 23:12:40 2022
+++ src/games/gomoku/gomoku.h	Fri May 20 19:30:17 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: gomoku.h,v 1.30 2022/05/19 23:12:40 rillig Exp $	*/
+/*	$NetBSD: gomoku.h,v 1.31 2022/05/20 19:30:17 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -71,7 +71,7 @@
 
 /*
  * A 'frame' is a group of five or six contiguous board locations.
- * An open ended frame is one with spaces on both ends; otherwise, its closed.
+ * An open-ended frame is one with spaces on both ends; otherwise, its closed.
  * A 'combo' is a group of intersecting frames and consists of two numbers:
  * 'A' is the number of moves to make the combo non-blockable.
  * 'B' is the minimum number of moves needed to win once it can't be blocked.
@@ -111,7 +111,7 @@
  * Different colors, <A1,B1> is the combo for the player with the next move:
  *	<A',B'> = A2 <= 1 && (A1 > 1 || A2 + B2 < A1 + B1) ? <A2,B2> : <A1,B1>
  *	We want to block only if we have to (i.e., if they are one move away
- *	from completing a force and we don't have a force that we can
+ *	from completing a force, and we don't have a force that we can
  *	complete which takes fewer or the same number of moves to win).
  */
 
@@ -161,8 +161,8 @@ struct combostr {
 };
 
 /* flag values for c_flags */
-#define C_OPEN_0	0x01		/* link[0] is an open ended frame */
-#define C_OPEN_1	0x02		/* link[1] is an open ended frame */
+#define C_OPEN_0	0x01		/* link[0] is an open-ended frame */
+#define C_OPEN_1	0x02		/* link[1] is an open-ended frame */
 #define C_LOOP		0x04		/* link[1] intersects previous frame */
 
 /*

Index: src/games/gomoku/pickmove.c
diff -u src/games/gomoku/pickmove.c:1.38 src/games/gomoku/pickmove.c:1.39
--- src/games/gomoku/pickmove.c:1.38	Thu May 19 23:12:40 2022
+++ src/games/gomoku/pickmove.c	Fri May 20 19:30:17 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pickmove.c,v 1.38 2022/05/19 23:12:40 rillig Exp $	*/
+/*	$NetBSD: pickmove.c,v 1.39 2022/05/20 19:30:17 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.38 2022/05/19 23:12:40 rillig Exp $");
+__RCSID("$NetBSD: pickmove.c,v 1.39 2022/05/20 19:30:17 rillig Exp $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -174,7 +174,7 @@ pickmove(int us)
 	}
 	/*
 	 * Block their combo only if we have to (i.e., if they are one move
-	 * away from completing a force and we don't have a force that
+	 * away from completing a force, and we don't have a force that
 	 * we can complete which takes fewer moves to win).
 	 */
 	if (Tcp->c.a <= 1 && (Ocp->c.a > 1 ||
@@ -269,7 +269,7 @@ scanframes(int color)
 		d = dd[r];
 		if (cp->c.b != 0) {
 			/*
-			 * Since this is the first spot of an open ended
+			 * Since this is the first spot of an open-ended
 			 * frame, we treat it as a closed frame.
 			 */
 			cb.c.a = cp->c.a + 1;
@@ -589,7 +589,7 @@ addframes(int level)
 			fcb.s = 0x200;
 
 		/*
-		 * If this is an open ended frame, use
+		 * If this is an open-ended frame, use
 		 * the combo value with the end closed.
 		 */
 		if (fsp->s_occ == EMPTY) {
@@ -654,7 +654,7 @@ makecombo(struct combostr *ocbp, struct 
 	/*
 	 * XXX: when I made functions static gcc started warning about
 	 * some members of vertices[0] maybe being used uninitialized.
-	 * For now I'm just going to clear it rather than wade through
+	 * For now, I'm just going to clear it rather than wade through
 	 * the logic to find out whether gcc or the code is wrong. I
 	 * wouldn't be surprised if it were the code though. - dholland
 	 */
@@ -1113,7 +1113,7 @@ checkframes(struct combostr *cbp, struct
 				return -1;
 			/*
 			 * If this is not the spot we are attaching
-			 * 'fcbp' to and it is a reasonable intersection
+			 * 'fcbp' to, and it is a reasonable intersection
 			 * spot, then there might be a loop.
 			 */
 			n = ip[tcbp - frames];
@@ -1125,8 +1125,8 @@ checkframes(struct combostr *cbp, struct
 					return -1;
 				/*
 				 * Check to be sure the intersection is not
-				 * one of the end points if it is an open
-				 * ended frame.
+				 * one of the end points if it is an
+				 * open-ended frame.
 				 */
 				if ((flags & C_OPEN_1) != 0 &&
 				    (n == tcbp->c_vertex ||
@@ -1161,7 +1161,7 @@ checkframes(struct combostr *cbp, struct
 			return -1;
 		/*
 		 * If this is not the spot we are attaching
-		 * 'fcbp' to and it is a reasonable intersection
+		 * 'fcbp' to, and it is a reasonable intersection
 		 * spot, then there might be a loop.
 		 */
 		n = ip[cbp - frames];
@@ -1173,8 +1173,8 @@ checkframes(struct combostr *cbp, struct
 				return -1;
 			/*
 			 * Check to be sure the intersection is not
-			 * one of the end points if it is an open
-			 * ended frame.
+			 * one of the end points if it is an open-ended
+			 * frame.
 			 */
 			if ((flags & C_OPEN_0) != 0 &&
 			    (n == cbp->c_vertex ||

Reply via email to