Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <array>
  2. #include <string>
  3. #include "campo.h"
  4.  
  5. struct Menu {
  6. int dificulty;
  7. int pos;
  8.  
  9. Campo * c;
  10.  
  11. std::array<std::string, 3> lv_menu = { "Facil", "Médio", "Difícil" };
  12.  
  13. Menu(Campo &c1, int pos1)
  14. : c(&c1), pos(pos1) {
  15. for(;;) {
  16. draw_on_campol(lv_menu);
  17. break;
  18. //input();
  19. }
  20. }
  21.  
  22. void draw_on_campol(std::array<std::string, 3> &n) {
  23. int w = pos;
  24. for(int i = 0; i < 3; i++) {
  25. for(int z = 0; z < n[i].size(); z++) {
  26. c->campo[w + z] = n[i][z];
  27. }
  28. w += c->width + 1;
  29. }
  30. }
  31.  
  32. //void input();
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement