Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef BORDER_H
- #define BORDER_H
- //int asciiH = 220;
- //int asciiW = 219;
- class Border
- {
- public:
- //void update ();
- void render ();
- int width=20;
- int height= 20;
- //int move ();
- };
- #endif
- #include <cstdlib>
- #include <iostream>
- //#include "Helpers.h"
- //#include "Snake.h"
- #include "Border.h"
- //#include "Fruit.h"
- void Border::render ()
- {
- for (int i = 1; i < width+2; i++)
- std::cout << "#";
- std::cout << "\n";
- for (int i = 0; i < height; i++)
- {
- for (int j = 0; j < width; j++)
- {
- if (j == 0)
- std::cout << "#";
- std::cout << " ";
- if (j == width - 1)
- std::cout << "#";
- //std::cout << " ";
- }
- std::cout << "\n";
- }
- for (int i = 0; i < width + 2; i++)
- std::cout << "#";
- std::cout << "\n";
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement