forked from its007Kevin/tetris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtextdisplay.h
32 lines (29 loc) · 860 Bytes
/
textdisplay.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
#ifndef TEXTDISPLAY_H
#define TEXTDISPLAY_H
#include <iostream>
#include <vector>
#include "observer.h"
#include "info.h"
class Cell;
class TextDisplay: public Observer {
std::vector<std::vector<char>> theDisplay;
std::vector<std::vector<char>> nextPiece;
std::vector<std::vector<char>> holdPiece = {std::vector<char>{' '}};
int score = 0;
int highScore = 0;
int r = 0;
int c = 0;
int level = 0;
bool runEnhancement = false;
public:
TextDisplay(int r, int c);
void notify(Subject &whoNotified) override;
void setLevel(int level);
void setNextPiece(std::vector<std::vector<char>> nextPiece);
void setHoldPiece(std::vector<std::vector<char>> holdPiece);
void setScore(int score);
void setHighScore(int highScore);
void enhancementsOn();
friend std::ostream &operator<<(std::ostream &out, const TextDisplay &td);
};
#endif