3
3
#include <limits.h>
4
4
#include <stdio.h>
5
5
6
+ #include "../libs/utilities.c"
7
+
6
8
int main () {
7
9
TGame game ;
8
10
@@ -25,6 +27,7 @@ int main() {
25
27
game .cellsDead = cols * rows ;
26
28
game .generation = 0 ;
27
29
30
+ setDashboardCenter (& game );
28
31
fillDashboard (& game , DEAD_CELL );
29
32
30
33
/* ----------------------------- Request Pattern ---------------------------- */
@@ -36,6 +39,7 @@ int main() {
36
39
printf ("> Pattern received: '%s'.\n\n" , requestedPattern );
37
40
38
41
drawPattern (& game , requestedPattern );
42
+ printDashboardByConsole (& game );
39
43
40
44
/* ----------------------- Request Maximum Generation ----------------------- */
41
45
@@ -55,14 +59,15 @@ int main() {
55
59
/* ------------------------------ Request Delay ----------------------------- */
56
60
57
61
sprintf (delayBetweenGenerationsMsg ,
58
- "> What should be the miliseconds delay between generations? (must be between %d "
59
- "and %d, both included): " ,
62
+ "> What should be the miliseconds delay between generations? (must be between %d and "
63
+ "%d, both included): " ,
60
64
MINIMUM_DELAY , MAXIMUM_DELAY );
61
65
62
66
delayBetweenGenerations = getUserInputStr (delayBetweenGenerationsMsg ,
63
67
"> Invalid delay! Try again..." , 5 , & validateDelay );
64
68
65
- sscanf (delayBetweenGenerations , "%d" , & delayBetweenGenerationsInt );
69
+ sscanf (delayBetweenGenerations , "%d" ,
70
+ & delayBetweenGenerationsInt );
66
71
67
72
printf ("> Delay received: %s miliseconds.\n" , delayBetweenGenerations );
68
73
0 commit comments