Check sleep interval before sleeping.
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 3 Sep 2012 18:42:55 +0000 (14:42 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 3 Sep 2012 18:42:55 +0000 (14:42 -0400)
forest-fire/001/src/forest_fire.ml

index 272815f..66285a9 100644 (file)
@@ -177,7 +177,7 @@ let next_generation forest (width, height) prob =
 let rec burn forest size prob interval =
   term_reset ();
   print_forest forest;
-  minisleep interval;
+  if interval > 0.0 then minisleep interval;
   burn (next_generation forest size prob) size prob interval
 
 
This page took 0.026717 seconds and 4 git commands to generate.