You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.3 KiB

  1. #include <iostream>
  2. #include <thread>
  3. #include <chrono>
  4. #include "components/Point.h"
  5. #include "components/Snack.h"
  6. #include "input-output/Graphics.h"
  7. void mainL01() {
  8. Graphics::get().init("Learners Helper");
  9. Point p(10,10,'X');
  10. p.print();
  11. Graphics::get().refreshScreen();
  12. std::this_thread::sleep_for(std::chrono::seconds(10));
  13. Graphics::get().finalize();
  14. std::cout << "Helper QUIT" << std::endl;
  15. }
  16. void mainL02() {
  17. Graphics::get().init("Learners Helper 02");
  18. Point p(10,10);
  19. generateSnack(&p);
  20. Graphics::get().refreshScreen();
  21. std::this_thread::sleep_for(std::chrono::seconds(10));
  22. Graphics::get().finalize();
  23. std::cout << "Helper QUIT" << std::endl;
  24. }
  25. void mainL03() {
  26. Graphics::get().init("Learners Helper 02");
  27. Point p(10,10);
  28. for (uint32_t i = 0; i < 100; i++) {
  29. p.moveDown();
  30. std::this_thread::sleep_for(std::chrono::milliseconds(100));
  31. p.moveRight();
  32. std::this_thread::sleep_for(std::chrono::milliseconds(100));
  33. }
  34. /*
  35. while(...) {
  36. // TODO: play with this
  37. }
  38. */
  39. /*
  40. do {
  41. // TODO: play with this
  42. } while (...)
  43. */
  44. Graphics::get().finalize();
  45. std::cout << "Helper QUIT" << std::endl;
  46. }
  47. int main() {
  48. mainL03();
  49. return 0;
  50. }