Skip to content

Commit e888d36

Browse files
committed
Make small improvements to the game
1 parent 9080188 commit e888d36

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,21 @@ int main()
2020

2121
auto pkmns = load_main_menu(manifest);
2222
auto& [player, ai] = pkmns;
23-
clear_screen();
2423

2524
while (player.hp > 0 && ai.hp > 0)
2625
{
26+
clear_screen();
2727
player.make_move(ai, print_frame(player, ai));
2828

2929
if (ai.hp > 0)
3030
{
3131
sleep(1000ms);
3232
ai.make_move(player, random_range<std::size_t>(1, 4));
33-
clear_screen();
3433
}
3534
}
3635

37-
clear_screen();
38-
slow_print((ai.hp == 0) ? "You Won :)" : "You Lost :(", 50ms);
36+
std::cout << '\n';
37+
delayed_print((ai.hp == 0) ? "You Won :)" : "You Lost :(", 50ms);
3938

4039
return EXIT_SUCCESS;
4140
}

0 commit comments

Comments
 (0)