Source-Changes-HG archive

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

[src/trunk]: src/games/gomoku gomoku: fix spelling and grammar in comments



details:   https://anonhg.NetBSD.org/src/rev/e76ca0cb54ac
branches:  trunk
changeset: 366256:e76ca0cb54ac
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri May 20 19:30:17 2022 +0000

description:
gomoku: fix spelling and grammar in comments

diffstat:

 games/gomoku/gomoku.h   |  10 +++++-----
 games/gomoku/pickmove.c |  24 ++++++++++++------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diffs (132 lines):

diff -r 1b222f1bc1c8 -r e76ca0cb54ac games/gomoku/gomoku.h
--- a/games/gomoku/gomoku.h     Fri May 20 16:12:34 2022 +0000
+++ b/games/gomoku/gomoku.h     Fri May 20 19:30:17 2022 +0000
@@ -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 @@
 };
 
 /* 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 */
 
 /*
diff -r 1b222f1bc1c8 -r e76ca0cb54ac games/gomoku/pickmove.c
--- a/games/gomoku/pickmove.c   Fri May 20 16:12:34 2022 +0000
+++ b/games/gomoku/pickmove.c   Fri May 20 19:30:17 2022 +0000
@@ -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 @@
        }
        /*
         * 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 @@
                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 @@
                        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 @@
        /*
         * 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 @@
                                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 @@
                                        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 @@
                        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 @@
                                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 ||



Home | Main Index | Thread Index | Old Index