Clarify that diagonal moves are not permitted in Pegs.
[sgt/puzzles] / guess.c
diff --git a/guess.c b/guess.c
index bf7a148..9b94123 100644 (file)
--- a/guess.c
+++ b/guess.c
@@ -637,7 +637,7 @@ static char *interpret_move(game_state *from, game_ui *ui, game_drawstate *ds,
         } else {
             over_hint = 1;
         }
-    } else if (x >= guess_ox &&
+    } else if (x >= guess_ox && x <= (guess_ox + GUESS_W) &&
                y >= GUESS_OY && y < guess_oy) {
         over_past_guess_y = (y - GUESS_OY) / PEGOFF;
         over_past_guess_x = (x - guess_ox) / PEGOFF;
@@ -1021,8 +1021,8 @@ static void draw_peg(frontend *fe, game_drawstate *ds, int cx, int cy,
         draw_rect(fe, cx-CGAP, cy-CGAP, PEGSZ+CGAP*2, PEGSZ+CGAP*2,
                   COL_BACKGROUND);
     if (PEGRAD > 0) {
-        draw_circle(fe, cx+PEGRAD, cy+PEGRAD, PEGRAD, 1, COL_EMPTY + col);
-        draw_circle(fe, cx+PEGRAD, cy+PEGRAD, PEGRAD, 0, COL_EMPTY + col);
+        draw_circle(fe, cx+PEGRAD, cy+PEGRAD, PEGRAD,
+                   COL_EMPTY + col, COL_EMPTY + col);
     } else
         draw_rect(fe, cx, cy, PEGSZ, PEGSZ, COL_EMPTY + col);
     draw_update(fe, cx-CGAP, cy-CGAP, PEGSZ+CGAP*2, PEGSZ+CGAP*2);
@@ -1030,7 +1030,7 @@ static void draw_peg(frontend *fe, game_drawstate *ds, int cx, int cy,
 
 static void draw_cursor(frontend *fe, game_drawstate *ds, int x, int y)
 {
-    draw_circle(fe, x+PEGRAD, y+PEGRAD, PEGRAD+CGAP, 0, COL_CURSOR);
+    draw_circle(fe, x+PEGRAD, y+PEGRAD, PEGRAD+CGAP, -1, COL_CURSOR);
 
     draw_update(fe, x-CGAP, y-CGAP, PEGSZ+CGAP*2, PEGSZ+CGAP*2);
 }
@@ -1129,8 +1129,7 @@ static void hint_redraw(frontend *fe, game_drawstate *ds, int guess,
                 rowy += HINTOFF;
             }
             if (HINTRAD > 0) {
-                draw_circle(fe, rowx+HINTRAD, rowy+HINTRAD, HINTRAD, 1, col);
-                draw_circle(fe, rowx+HINTRAD, rowy+HINTRAD, HINTRAD, 0, col);
+                draw_circle(fe, rowx+HINTRAD, rowy+HINTRAD, HINTRAD, col, col);
             } else {
                 draw_rect(fe, rowx, rowy, HINTSZ, HINTSZ, col);
             }