-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGame.hpp
55 lines (50 loc) · 1018 Bytes
/
Game.hpp
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
50
51
52
53
54
55
//
// Game.hpp
// cpp_algo
//
// Created by 이승원 on 2022/05/01.
//
#ifndef Game_hpp
#define Game_hpp
#include "Map.hpp"
#include "Snake.hpp"
#include <stdio.h>
#include <ncurses.h>
#include <chrono>
#include <thread>
#include "Item.hpp"
class Game {
private:
Snake *snake;
int** map;
Item *item;
int mode, row, column, stage, end;
int growth, poison, gate, maxLength;
int gateX_1, gateY_1, gateX_2, gateY_2;
int active_gate, check_gate, gate_time;
public:
//constructor
Game(int row, int column);
//setter
void setMode(int mode);
void setStage(int stage);
//
void gameInit(int stage);
//draw
void drawMap() const;
void drawSnake() const;
void drawScore();
void drawTodo();
void drawHowto() const;
void drawClear() const;
//move
void moveSnake();
int GameStart();
//evnt
int eventDeath() const;
void makeItem();
void makePotal();
void potalEvent();
//timer
};
#endif /* Game_hpp */