summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2022-01-04 18:33:47 +0000
committerIan C <ianc@noddybox.co.uk>2022-01-04 18:33:47 +0000
commitdf449ab83c4283c86bddc5c39073c1613ef513b1 (patch)
tree0f8a81865699389a0c6a4578622cdc03634dd007
parent7740eb37fe1343df20efa00f5646792c24f614a1 (diff)
Rejigged timer for auto fill.HEADmaster
-rw-r--r--klondike.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/klondike.c b/klondike.c
index 1aa1d4e..b899eb0 100644
--- a/klondike.c
+++ b/klondike.c
@@ -261,10 +261,6 @@ int Klondike(int draw, int thoughtful)
if (autofill)
{
- struct timespec spec = {0};
-
- spec.tv_nsec = 250000000;
-
for(f = 0; f < 7; f++)
{
if (PutCardOnSuitPile(&column_up[f],
@@ -273,8 +269,6 @@ int Klondike(int draw, int thoughtful)
RevealCard(&column_down[pos_x], &column_up[pos_x]);
}
}
-
- nanosleep(&spec, NULL);
}
if (hearts.no == 13 && diamonds.no == 13 &&
@@ -284,6 +278,13 @@ int Klondike(int draw, int thoughtful)
}
refresh();
+
+ if (autofill)
+ {
+ struct timespec spec = {0};
+ spec.tv_nsec = 250000000;
+ nanosleep(&spec, NULL);
+ }
if (!won && !autofill)
{