Skip to content

Commit

Permalink
ci: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 11, 2024
1 parent 2b25ae5 commit 00ae693
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,29 @@ int main() {

fillDashboard(&game, 0);

do{
do {
requestedPattern = getUserInputStr(
"> Which pattern do you want "
"('Glider','Toad', 'Press', or 'Glider cannon')? ",
"> Invalid pattern! Try again...", 50, &validatePattern);
"> Which pattern do you want "
"('Glider','Toad', 'Press', or 'Glider cannon')? ",
"> Invalid pattern! Try again...", 50, &validatePattern);
printf("> Pattern received: '%s'", requestedPattern);

invalidPattern = 0;

if(strcmpi(requestedPattern,"GLIDER") == 0)
gliderPattern (dashboard);
else if(strcmpi(requestedPattern,"TOAD") == 0)
toadPattern(dashboard);
else if(strcmpi(requestedPattern,"PRESS") == 0)
pressPattern(dashboard);
else if (strcmpi(requestedPattern,"GLIDER CANNON") == 0)
gliderCannonPattern(dashboard);
else{
puts("INVALID PATTERN, try again... :");
invalidPattern = 1;
}

}while(invalidPattern);

if (strcmpi(requestedPattern, "GLIDER") == 0)
gliderPattern(dashboard);
else if (strcmpi(requestedPattern, "TOAD") == 0)
toadPattern(dashboard);
else if (strcmpi(requestedPattern, "PRESS") == 0)
pressPattern(dashboard);
else if (strcmpi(requestedPattern, "GLIDER CANNON") == 0)
gliderCannonPattern(dashboard);
else {
puts("INVALID PATTERN, try again... :");
invalidPattern = 1;
}

} while (invalidPattern);

return 0;
}

0 comments on commit 00ae693

Please sign in to comment.