aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC. McEnroe <june@causal.agency>2019-04-03 13:44:34 -0400
committerC. McEnroe <june@causal.agency>2019-04-03 13:44:34 -0400
commit98454f3076a056b6299b3083fcc1c33a55594b5f (patch)
treedbe52555212a6f4ba94e1585dcf0b65d6f80239f
parentSelect and move cards on mouse up (diff)
downloadcards-98454f3076a056b6299b3083fcc1c33a55594b5f.tar.gz
cards-98454f3076a056b6299b3083fcc1c33a55594b5f.zip
Check gameAvail on double-click
-rw-r--r--freecell.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/freecell.c b/freecell.c
index bea3662..f6562b8 100644
--- a/freecell.c
+++ b/freecell.c
@@ -290,6 +290,7 @@ static bool mouseButtonUp(SDL_MouseButtonEvent button) {
if (!item) return false;
card = item->card;
}
+ if (!gameAvail(card)) return false;
for (uint dst = Cell1; dst <= Cell4; ++dst) {
if (gameMove(dst, card)) break;
}