]> thyrsus.com Git - galaxis.git/commitdiff
James Hillers's bug fix.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 21 Apr 2002 02:05:04 +0000 (02:05 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 21 Apr 2002 02:05:04 +0000 (02:05 +0000)
Makefile
galaxis.c

index 9478d7066c4013fbc3f3cfb964012ba40e6e9bb7..b21db205159ebdaeacceadeff71dc37043cc31d5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 
 # Note: When the version changes, you also have to change
 # the RPM spec file and the LSM.
-VERS=1.2
+VERS=1.3
 
 # Flags for use with the Linux ncurses package (recommended)
 CFLAGS = -g -DNDEBUG  # -I/usr/local/include -L/usr/local/lib
index 6bafa6ffab4c540faf85e0e511e9171ba76a2a36..22e3a5832221d35fccb4378676eb3ec6d22950a2 100644 (file)
--- a/galaxis.c
+++ b/galaxis.c
@@ -3,6 +3,7 @@
  *
  * version 1.0 by Eric S. Raymond <esr@snark.thyrsus.com> Sun Oct 23 1994
  * version 1.1 adds mouse support Wed Sep 20 1995
+ * version 1.2 corrects buggy handling of multiple reprobes Sat Apr 20 2002
  */
 #define _POSIX_SOURCE
 
@@ -538,7 +539,12 @@ static void auto_mark(cury, curx)
 static void drop_probe(int cury, int curx)
 /* drop a probe on the given spot */
 {
-    if (board[cury][curx] & S_LIFEBOAT)
+    if (board[cury][curx] & S_BOATSEEN)
+    {
+       prompt("This lifeboat is already visible.");
+       beep();
+    }
+    else if (board[cury][curx] & S_LIFEBOAT)
     {
        board[cury][curx] |= S_BOATSEEN;
        prompt("You found a lifeboat!");
@@ -546,11 +552,6 @@ static void drop_probe(int cury, int curx)
        turn++;
        boatsfound++;
     }
-    else if (board[cury][curx] & S_BOATSEEN)
-    {
-       prompt("This lifeboat is already visible.");
-       beep();
-    }
     else
     {
        int visibles, total;