|
@ -12,6 +12,7 @@ void mainL01() { |
|
|
Point p(10,10,'X'); |
|
|
Point p(10,10,'X'); |
|
|
p.print(); |
|
|
p.print(); |
|
|
|
|
|
|
|
|
|
|
|
Graphics::get().refreshScreen(); |
|
|
std::this_thread::sleep_for(std::chrono::seconds(10)); |
|
|
std::this_thread::sleep_for(std::chrono::seconds(10)); |
|
|
|
|
|
|
|
|
Graphics::get().finalize(); |
|
|
Graphics::get().finalize(); |
|
@ -25,6 +26,7 @@ void mainL02() { |
|
|
Point p(10,10); |
|
|
Point p(10,10); |
|
|
generateSnack(&p); |
|
|
generateSnack(&p); |
|
|
|
|
|
|
|
|
|
|
|
Graphics::get().refreshScreen(); |
|
|
std::this_thread::sleep_for(std::chrono::seconds(10)); |
|
|
std::this_thread::sleep_for(std::chrono::seconds(10)); |
|
|
|
|
|
|
|
|
Graphics::get().finalize(); |
|
|
Graphics::get().finalize(); |
|
@ -39,8 +41,10 @@ void mainL03() { |
|
|
|
|
|
|
|
|
for (uint32_t i = 0; i < 100; i++) { |
|
|
for (uint32_t i = 0; i < 100; i++) { |
|
|
p.moveDown(); |
|
|
p.moveDown(); |
|
|
|
|
|
Graphics::get().refreshScreen(); |
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(100)); |
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(100)); |
|
|
p.moveRight(); |
|
|
p.moveRight(); |
|
|
|
|
|
Graphics::get().refreshScreen(); |
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(100)); |
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(100)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|