-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
44 lines (39 loc) · 907 Bytes
/
main.cpp
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
#include <iostream>
#include <fstream>
#include <sstream>
#include "CGame.h"
#include "CUnit.h"
#include "CCharacter.h"
#include "CBenefit.h"
#include <ncurses.h>
int main(int argc, char * argv []){
initscr();
cbreak();
noecho();
curs_set(0);
start_color();
init_pair(1, COLOR_BLUE, COLOR_BLACK);
init_pair(2, COLOR_GREEN, COLOR_BLACK);
init_pair(3, COLOR_RED, COLOR_BLACK);
init_pair(4, COLOR_YELLOW, COLOR_BLACK);
init_pair(5, COLOR_BLUE, COLOR_BLACK);
init_pair(6, COLOR_CYAN, COLOR_BLACK);
init_pair(7, COLOR_MAGENTA, COLOR_BLACK);
//keypad(stdscr, true);
ifstream ifs;
ifs.open("Map.txt", ios::in);
if(!ifs){
endwin();
return 1;
}
CGame game (ifs);
ifs.close();
while(game.Running()){
game.Draw();
game.Input();
game.Logic();
}
refresh();
endwin();
return 0;
}