summaryrefslogtreecommitdiffstats
path: root/tetris/tetris.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2014-06-11 16:47:39 +0000
committerchristos <christos@NetBSD.org>2014-06-11 16:47:39 +0000
commit1033fba35c308f3253abd40f163d7c52ef7ac5fb (patch)
tree7188b5503b94cde1c8280e6c0336559d7a778bea /tetris/tetris.c
parentdb7a726b9bff1bdf1fbba8c65d338e1236f854bb (diff)
downloadbsdgames-darwin-1033fba35c308f3253abd40f163d7c52ef7ac5fb.tar.gz
bsdgames-darwin-1033fba35c308f3253abd40f163d7c52ef7ac5fb.zip
Add a little color. In order to minimize logic differences, keep 0 as the
empty board value, and since 7 is white, turn white into black (0) when painting.
Diffstat (limited to 'tetris/tetris.c')
-rw-r--r--tetris/tetris.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tetris/tetris.c b/tetris/tetris.c
index 4943249a..9ccaa2f4 100644
--- a/tetris/tetris.c
+++ b/tetris/tetris.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tetris.c,v 1.24 2011/08/31 16:24:56 plunky Exp $ */
+/* $NetBSD: tetris.c,v 1.25 2014/06/11 16:47:39 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -92,7 +92,7 @@ setup_board(void)
p = board;
for (i = B_SIZE; i; i--)
- *p++ = i <= (2 * B_COLS) || (i % B_COLS) < 2;
+ *p++ = (i <= (2 * B_COLS) || (i % B_COLS) < 2) ? 7 : 0;
}
/*