-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtictactoe.h
49 lines (43 loc) · 946 Bytes
/
tictactoe.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
49
#ifndef TICTACTOE_H
#define TICTACTOE_H
#include <QMainWindow>
#include <QGridLayout>
#include <QPushButton>
#include <QLabel>
namespace Ui {
class TicTacToe;
}
class TicTacToe : public QMainWindow
{
Q_OBJECT
public:
explicit TicTacToe(QWidget *parent = 0);
~TicTacToe();
QWidget * wind;
QPushButton * button[3][3];
QHBoxLayout * hl1;
QHBoxLayout * hl2;
QHBoxLayout * hl3;
QHBoxLayout * hl4;
QHBoxLayout * hl5;
QHBoxLayout * main;
QVBoxLayout * vl1;
QVBoxLayout * vl2;
QLabel * lbl;
QLabel * scoreX;
QLabel * scoreO;
QLabel * numX;
QLabel * numO;
private:
Ui::TicTacToe *ui;
int turn;
QPalette labelPalette;
bool checkWin();
void putPalette(QLabel * l);
void definitions();
void msg(QString text);
private slots:
void setButton();
void reset(bool def);
};
#endif // TICTACTOE_H