save record in memory
This commit is contained in:
parent
247d252def
commit
f6901505af
8
main.c
8
main.c
|
@ -276,7 +276,7 @@ int main(void)
|
||||||
|
|
||||||
SetConfigFlags(FLAG_WINDOW_RESIZABLE);
|
SetConfigFlags(FLAG_WINDOW_RESIZABLE);
|
||||||
#ifdef RELEASE
|
#ifdef RELEASE
|
||||||
// SetTraceLogLevel(LOG_ERROR);
|
SetTraceLogLevel(LOG_ERROR);
|
||||||
#endif // RELEASE
|
#endif // RELEASE
|
||||||
|
|
||||||
InitWindow(screen_width, screen_height, "mineur");
|
InitWindow(screen_width, screen_height, "mineur");
|
||||||
|
@ -505,11 +505,13 @@ int main(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (game_state != LOSE && count_undiscovered_cell <= nb_bomb) {
|
if (game_state != LOSE && count_undiscovered_cell <= nb_bomb) {
|
||||||
if (timer < atoi(timer_record[current_game_type]))
|
if (timer < atoi(timer_record[current_game_type])) {
|
||||||
game_state = RECORD;
|
game_state = RECORD;
|
||||||
else
|
snprintf(timer_record[current_game_type], GAME_TYPE_NB, "%d", (int) timer);
|
||||||
|
} else {
|
||||||
game_state = WIN;
|
game_state = WIN;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (game[mouse_map_y][mouse_map_x] == 'X') {
|
if (game[mouse_map_y][mouse_map_x] == 'X') {
|
||||||
memset(discover, 1, game_cap);
|
memset(discover, 1, game_cap);
|
||||||
|
|
Loading…
Reference in New Issue