diff options
author | rodri <rgl@antares-labs.eu> | 2023-09-15 23:06:58 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-09-15 23:06:58 +0000 |
commit | e59ffbe6921ccea4d8039082d6d093568edfa08d (patch) | |
tree | fc1b960c267682db2d67a859121c7d1736452591 | |
parent | 48fe28aa56b83af341957b472c023a667639776c (diff) | |
download | battleship-e59ffbe6921ccea4d8039082d6d093568edfa08d.tar.gz battleship-e59ffbe6921ccea4d8039082d6d093568edfa08d.tar.bz2 battleship-e59ffbe6921ccea4d8039082d6d093568edfa08d.zip |
don't send shots when the game is over. and freeze the cursor.
-rw-r--r-- | bts.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -509,7 +509,7 @@ lmb(Mousectl *mc) else if(ptinrect(mc->xy, localboard.bbox)) b = &localboard; - if(b == nil) + if(b == nil || conclusion.s != nil) return; cell = toboard(b, mc->xy); @@ -639,7 +639,7 @@ mouse(Mousectl *mc) } } - if(game.state == Playing) + if(game.state == Playing && conclusion.s == nil) if(ptinrect(mc->xy, alienboard.bbox)) csetcursor(mctl, &aimcursor); else |