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.

66 lines
1.2 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. std::this_thread::sleep_for(std::chrono::seconds(10));
  12. Graphics::get().finalize();
  13. std::cout << "Helper QUIT" << std::endl;
  14. }
  15. void mainL02() {
  16. Graphics::get().init("Learners Helper 02");
  17. Point p(10,10);
  18. generateSnack(&p);
  19. std::this_thread::sleep_for(std::chrono::seconds(10));
  20. Graphics::get().finalize();
  21. std::cout << "Helper QUIT" << std::endl;
  22. }
  23. void mainL03() {
  24. Graphics::get().init("Learners Helper 02");
  25. Point p(10,10);
  26. for (uint32_t i = 0; i < 100; i++) {
  27. p.moveDown();
  28. std::this_thread::sleep_for(std::chrono::milliseconds(100));
  29. p.moveRight();
  30. std::this_thread::sleep_for(std::chrono::milliseconds(100));
  31. }
  32. /*
  33. while(...) {
  34. // TODO: play with this
  35. }
  36. */
  37. /*
  38. do {
  39. // TODO: play with this
  40. } while (...)
  41. */
  42. Graphics::get().finalize();
  43. std::cout << "Helper QUIT" << std::endl;
  44. }
  45. int main() {
  46. mainL03();
  47. return 0;
  48. }