-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.h
38 lines (37 loc) · 964 Bytes
/
game.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
#include "forme.h"
#include "level.h"
#include <chrono>
#include <stdlib.h>
#include <iostream>
#include <iomanip>
#include <conio.h>
#define LARGEUR 10
#define HAUTEUR 24
class Game
{
public:
Game();
~Game();
void afficher();
bool collision(Forme *forme);
void ligneComplete();
void shiftBoard(int index);
void input();
void mort();
void bougerForme(Forme *forme, int x, int y);
void changerForme();
void tournerForme(Forme *forme);
void tournerForme(Forme *forme, int direction);
void formeVersBoard(Forme *forme);
void loop();
private:
Forme *curForme;
Forme *preview;
Forme *prochaineForme;
Level level;
int board[HAUTEUR][LARGEUR] = {0};
int score;
int linesCleared;
bool alive;
std::chrono::time_point<std::chrono::high_resolution_clock> lastAction, curTime;
};