-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcanva.h
48 lines (35 loc) · 1.19 KB
/
canva.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef CONSOLECANVA_
#define CONSOLECANVA_
#include <iostream>
#include <stdlib.h>
using std::ostream;
class Canvas
{
protected:
static const int DEFAULT_CANVA_SIZE = 20;
static const int MAX_CANVA_SIZE = 120;
int size_x;
int size_y;
char background;
char border;
char ** canva;
void fillEmpty();
public:
/*********** STATYCZNE ***********/
static void ClearConsoleScreen();
static inline void clear_buffer(void)
{
while (std::cin.get() != '\n');
}
/************* KONSTR ************/
//konstruktory zwykłe
Canvas(int size_x, int size_y, char background, char border);
Canvas();
//konstruktor kopiujący
Canvas(const Canvas &);
//destruktor
virtual ~Canvas(void);
/************ METODY *************/
virtual void print(ostream & out = std::cout) const;
};
#endif