-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboard.h
38 lines (34 loc) · 784 Bytes
/
board.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
#ifndef __BOARD_H__
#define __BOARD_H__
#include <iostream>
#include <string>
#include "cell.h"
#include "textdisplay.h"
#include "level.h"
#include "window.h"
#include "score.h"
class Board{
Cell **theBoard;
TextDisplay *td;
Level *level;
Score *score;
Xwindow *w;
int findRowFull();
void draw(int x, int y, char type);
public:
Board();
~Board();
void placeIn(Block *b);
void clearBlock(Block *b);
void moveBlock(Block *b, char dir);
void rotate(Block *b, std::string dir);
bool checkMove(Block *b, std::string dir);
Block* blockGenerator(int lvl);
void clearRow();
int getLvl() const;
void setLvl(int newLvl);
int getScore() const;
int getHiScore() const;
friend std::ostream& operator<<(std::ostream &out, const Board &b);
};
#endif