+ return result;
+}
+
+static void
+count_next_moves(int y, int x)
+{
+ int count = 0;
+ unsigned j;
+
+ wprintw(msgwin, "\nMove %d", movecount);
+ for (j = 0; j < SIZEOF(offsets); j++) {
+ int newy = y + offsets[j].y;
+ int newx = x + offsets[j].x;
+ if (chksqr(newy, newx)) {
+ ++count;
+ }
+ }
+ wprintw(msgwin, ", gives %d choices", count);
+ wclrtoeol(msgwin);