Source-Changes-HG archive

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

[src/trunk]: src/games/gomoku gomoku: clean up coordinate for the currently s...



details:   https://anonhg.NetBSD.org/src/rev/fd1e0b46e358
branches:  trunk
changeset: 366243:fd1e0b46e358
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu May 19 22:24:54 2022 +0000

description:
gomoku: clean up coordinate for the currently selected spot

There is no need to make this coordinate dependent on the board size.

No binary change.

diffstat:

 games/gomoku/bdisp.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r fe0528a85cd7 -r fd1e0b46e358 games/gomoku/bdisp.c
--- a/games/gomoku/bdisp.c      Thu May 19 22:19:18 2022 +0000
+++ b/games/gomoku/bdisp.c      Thu May 19 22:24:54 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bdisp.c,v 1.34 2022/05/19 22:19:18 rillig Exp $        */
+/*     $NetBSD: bdisp.c,v 1.35 2022/05/19 22:24:54 rillig Exp $        */
 
 /*
  * Copyright (c) 1994
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 /*     @(#)bdisp.c     8.2 (Berkeley) 5/3/95   */
-__RCSID("$NetBSD: bdisp.c,v 1.34 2022/05/19 22:19:18 rillig Exp $");
+__RCSID("$NetBSD: bdisp.c,v 1.35 2022/05/19 22:24:54 rillig Exp $");
 
 #include <curses.h>
 #include <string.h>
@@ -345,7 +345,7 @@
        nx = curx;
        ny = cury;
        for (;;) {
-               mvprintw(BSZ + 3, (BSZ - 6) / 2, "(%c %d) ",
+               mvprintw(BSZ + 3, 6, "(%c %d) ",
                    letters[curx + 1], cury + 1);
                move(scr_y(cury + 1), scr_x(curx + 1));
 
@@ -462,7 +462,7 @@
                        return SAVE;
                case ' ':
                case '\r':
-                       (void)mvaddstr(BSZ + 3, (BSZ - 6) / 2, "      ");
+                       (void)mvaddstr(BSZ + 3, 6, "      ");
                        return PT(curx + 1, cury + 1);
                }
 



Home | Main Index | Thread Index | Old Index