chiark / gitweb /
Incorrect placing of the polyhedron sometimes left it on a blue
authorSimon Tatham <anakin@pobox.com>
Fri, 30 Apr 2004 10:11:53 +0000 (10:11 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 30 Apr 2004 10:11:53 +0000 (10:11 +0000)
square. Oops.

[originally from svn r4175]

cube.c

diff --git a/cube.c b/cube.c
index 5940c8b925c13b2c0e66cf351842ff3c8caa2874..a0abf6d21785bbc8e4a3cd467721ef67f5ed0dd8 100644 (file)
--- a/cube.c
+++ b/cube.c
@@ -559,7 +559,7 @@ char *new_game_seed(game_params *params)
     /*
      * Choose a non-blue square for the polyhedron.
      */
-    sprintf(p, ":%d", rand_upto(m));
+    sprintf(p, ":%d", data.gridptrs[0][rand_upto(m)]);
 
     sfree(data.gridptrs[0]);
     sfree(flags);