-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchange
26 lines (26 loc) · 1.21 KB
/
change
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
//In case player would like to undo and/or redo
printf("Are you sure?\nIf yes, press Enter to proceed\nIf not, press U to undo\n");
char check ;
scanf("%c", &check);
while (check!= '\n')
{int para;
if (check == 'U' || check == 'u') {
para = 0;
point--;
printf("Are you sure?\nIf yes, press Enter to proceed\nIf not, press R to redo\n");
scanf("%c", &check);
while (check!= '\n'){
printf("Invalid input! Try again!");
scanf("%c", &check);
if (check == 'R' || check == 'r') {
point++;
para = 1;}
else {
while (check != 'R' || check != 'r'){
printf("Invalid input! Try again!");
scanf("%c", &check);
}
}
}
}
}