[hitori] Prevent multiple hints being triggered at the same time



commit 4c4a9c5a04e7261c9387fef242291bf4045ed89a
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Oct 31 11:13:29 2010 +0000

    Prevent multiple hints being triggered at the same time

 src/interface.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/interface.c b/src/interface.c
index d76bd44..86549c6 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -352,6 +352,10 @@ hitori_hint_cb (GtkAction *action, Hitori *hitori)
 {
 	HitoriVector iter;
 
+	/* Bail if we're already hinting */
+	if (hitori->hint_status > 0 && hitori->hint_status < HINT_FLASHES)
+		return;
+
 	/* Find the first cell which should be painted, but isn't (or vice-versa) */
 	for (iter.x = 0; iter.x < hitori->board_size; iter.x++) {
 		for (iter.y = 0; iter.y < hitori->board_size; iter.y++) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]