-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdifficulty.c
44 lines (39 loc) · 1.53 KB
/
difficulty.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* difficulty.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ccastill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/29 02:34:38 by ccastill #+# #+# */
/* Updated: 2020/05/29 07:01:22 by ccastill ### ########.fr */
/* */
/* ************************************************************************** */
#include "Nostromo.h"
void difficulty()
{
system("clear");
printf("Seleccione la dificultad\n1 - Fácil\n2 - Normal\n3 - Dificil\n\n");
while (next->difficulty[0] != '1' && next->difficulty[0] != '2' && next->difficulty[0] != '3')
{
fgets(next->difficulty, 5, stdin);
}
if (next->difficulty[0] == '1') // Fácil
{
next->number_enemies = 2;
next->enemy_lives = 2;
next->player_lives = 4;
}
if (next->difficulty[0] == '2') // Normal
{
next->number_enemies = 4;
next->enemy_lives = 3;
next->player_lives = 3;
}
if (next->difficulty[0] == '3') // Dificil
{
next->number_enemies = 5;
next->enemy_lives = 4;
next->player_lives = 2;
}
}