mirror of
https://github.com/Soccera1/agg.git
synced 2025-09-20 21:57:04 +02:00
Allow configuration of difficulty
This commit is contained in:
parent
3717c5f020
commit
404ae7f647
1 changed files with 6 additions and 2 deletions
|
@ -19,6 +19,10 @@ int main(void) {
|
||||||
printf ("\nHow long would you like to play for? Answer in seconds.\n");
|
printf ("\nHow long would you like to play for? Answer in seconds.\n");
|
||||||
scanf ("%d", &playtime);
|
scanf ("%d", &playtime);
|
||||||
|
|
||||||
|
int number_length;
|
||||||
|
printf ("Please enter maximum possible number\n");
|
||||||
|
scanf ("%d", & number_length);
|
||||||
|
|
||||||
time_t unix_time;
|
time_t unix_time;
|
||||||
unix_time = time(NULL);
|
unix_time = time(NULL);
|
||||||
int end_time = unix_time + playtime;
|
int end_time = unix_time + playtime;
|
||||||
|
@ -30,8 +34,8 @@ int main(void) {
|
||||||
// I can't remember what the fuck these are for
|
// I can't remember what the fuck these are for
|
||||||
|
|
||||||
while (unix_time < end_time) {
|
while (unix_time < end_time) {
|
||||||
float num1 = rand() % 10 + 1;
|
float num1 = rand() % number_length + 1;
|
||||||
float num2 = rand() % 10 + 1;
|
float num2 = rand() % number_length + 1;
|
||||||
int type = rand() % 4 + 1;
|
int type = rand() % 4 + 1;
|
||||||
float result;
|
float result;
|
||||||
float answer;
|
float answer;
|
||||||
|
|
Loading…
Add table
Reference in a new issue