File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed
Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,7 @@ void print_splash_screen(const std::filesystem::path& assets_dir)
4141
4242 std::cout << ' \n ' << std::setfill (' ' ) << std::setw (19 );
4343
44- for (const char & c : " copyright (c) 2021 cpp-gamedev" )
45- {
46- std::cout << c;
47- utils::sleep (std::chrono::milliseconds{50 });
48- }
44+ utils::slow_print (" copyright (c) 2021 cpp-gamedev" , std::chrono::milliseconds{50 });
4945}
5046
5147void print_move_table (const models::Pokemon& pkmn)
Original file line number Diff line number Diff line change 11#pragma once
22
33#include < array>
4- #include < string>
5- #include < vector>
4+ #include < string>
5+ #include < vector>
66
77#include " models.hpp"
88
Original file line number Diff line number Diff line change 22#include " models.hpp"
33#include " utils.hpp"
44
5+ using namespace std ::chrono_literals;
6+
57using namespace anim ;
68using namespace models ;
79using namespace utils ;
810
911int main ()
1012{
11- constexpr std::chrono::milliseconds delay{1000 };
1213 const auto assets_dir = find_upwards (" assets" );
1314 Manifest manifest = check_manifest (assets_dir.parent_path () / " manifest.json" );
1415
@@ -27,15 +28,14 @@ int main()
2728
2829 if (ai.hp > 0 )
2930 {
30- sleep (delay );
31+ sleep (1000ms );
3132 ai.make_move (player, random_range<std::size_t >(1 , 4 ));
3233 clear_screen ();
3334 }
34-
3535 }
3636
3737 clear_screen ();
38- slow_print ((ai.hp == 0 ) ? " You Won :)" : " You Lost :(" , delay / 20 );
38+ slow_print ((ai.hp == 0 ) ? " You Won :)" : " You Lost :(" , 50ms );
3939
4040 return EXIT_SUCCESS;
4141 }
You can’t perform that action at this time.
0 commit comments