Skip to content

Commit

Permalink
Updated UX
Browse files Browse the repository at this point in the history
  • Loading branch information
Alispezzate committed Dec 22, 2020
1 parent 99b9e27 commit b97326c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 31 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
The app is a pretty straightforward command line app, you just have to insert your ultimate level, the total amount of health and it will display the optimal amount of damage you can make with it.

TODO:<br>
-Explaining the formula of ultimate damage <br>
-Optimizing the data input process<br>
-And more
-Explain the formula of ultimate damage <br>
-Add information about garen ultimate, lol patch version and reasons to use the program<br>
-And more<br>

This is a fan-made app and all rights are reserved to Riot Games based in Santa Monica, California.
67 changes: 39 additions & 28 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,49 @@
#include <stdlib.h>

int main() {
int level, totHealth, total;
char c='c';
while (1) {
int level, totHealth;
int total;

do {
printf("What's your ultimate level?\n");
scanf("%d", &level);
printf("What's your target total health?\n");
scanf("%d", &totHealth);
switch (c) {
case 'c':
do {
printf("What's your ultimate level?\n");
scanf("%d", &level);
printf("What's your target total health?\n");
scanf("%d", &totHealth);

switch (level)
{
case 1:
total = ((totHealth + 750) / 6);
printf("The optimal ultimate damage is %d\n", total);
break;
case 2:
total = ((totHealth + 1200) / 5);
printf("The optimal ultimate damage is %d\n", total);
break;
case 3:
total = ((totHealth + 1500) * 3 / 13);
printf("The optimal ultimate damage is %d\n", total);
switch (level)
{
case 1:
total = ((totHealth + 750) / 6);
printf("The optimal ultimate damage is %d\n", total);
break;
case 2:
total = ((totHealth + 1200) / 5);
printf("The optimal ultimate damage is %d\n", total);
break;
case 3:
total = ((totHealth + 1500) * 3 / 13);
printf("The optimal ultimate damage is %d\n", total);
break;
default:
printf("Ultimate level not valid\n");
break;
}
} while (level < 1 || level > 3);
printf("Type c to calculate, type e to exit\n");
while(getchar()!='\n');
scanf("%c", &c);
system("@cls");
break;
default:
printf("Ultimate level not valid\n");
case 'e':
exit(1);
break;
}
} while (level < 1 || level > 3);
printf("Press enter to calc with new datas\n");
while (getchar() != '\n');
while (getchar() != '\n');
system("@cls");

} while (c != 'e' && c != 'c');
}
}
}


0 comments on commit b97326c

Please sign in to comment.