-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoard.h
44 lines (36 loc) · 824 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
39
40
41
42
43
44
#ifndef BOARD_H
#define BOARD_H
#include "Constants.h"
#include "Fl_Widget.H"
#include "Fl_Box.H"
#include "Figure.h"
#include "fl_draw.H"
#include "Fl.H"
#include "Fl_Button.H"
#include <sstream>
#include <string>
class Board : public Fl_Widget
{
bool form[linemax][colmax]; //есть ли кубик (1 - да, 0 - нет)
int fillcolor[linemax][colmax];
int nextFigure[5][5];
std::string scorelabel;
Fl_Box* scorebox;
int score;
Figure nowfigure, nextfigure;
public:
Board();
static void timeractions(void *p);
void set_score(Fl_Box **s);
private:
bool can_down();
void draw();
void transfer_cubes();
void delete_line();
void draw_cube();
bool create_figure();
void delete_cube();
void period();
int handle(int h);
};
#endif // BOARD_H