Changeset 20 for trunk


Ignore:
Timestamp:
Dec 19, 2005, 6:44:44 AM (14 years ago)
Author:
jtv
Message:

Fixed "you win" logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ui_web.c

    r19 r20  
    2424youwin[] =
    2525  "<h1>You win.  Congratulations!</h1>",
     26youlose[] =
     27  "<h1><em>Boom!</em>  You lose.</h1>",
    2628footer[] =
    2729  "</body></html>\n"
     
    192194    else if (coords_set)
    193195    {
    194       if (mines_probe(F, atr, atc, 0))
     196      if (!mines_probe(F, atr, atc, 0))
     197      {
     198        puts(youlose);
     199        /* TODO: Actually stop the game here! */
     200        done=1;
     201      }
     202      else if (!mines_togo(F))
    195203      {
    196204    puts(youwin);
    197205    done=1;
    198       }
    199       else
    200       {
    201         puts("<h1>You lose!</h1>");
    202         /* TODO: Actually stop the game here! */
    203         done=1;
    204206      }
    205207    }
Note: See TracChangeset for help on using the changeset viewer.