-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (31 loc) · 751 Bytes
/
main.cpp
File metadata and controls
38 lines (31 loc) · 751 Bytes
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
//Library Directives
#include <curses.h>
#include <memory>
//Project Directives
#include "headers/screen.hpp"
//Main Function
int main(int argc, char** argv){
initscr();
cbreak();
raw();
noecho();
start_color();
//Initialise colours
init_pair(1,9,0); //FG: red, BG: black
init_pair(2,12,0); //FG: blue, BG: black
init_pair(3,9,9); //FG: red, BG: red
init_pair(4,12,12); //FG: blue, BG: blue
//Create screens
std::unique_ptr<Screen> s = std::make_unique<Screen>(31,62,0,0);
std::unique_ptr<Screen> s2 = std::make_unique<Screen>(31,62,0,64);
refresh();
s->fill(".", 1);
s->grid("X", 2, 2);
wrefresh(s->win);
s2->fill(".", 3);
s2->grid("X", 4, 2);
wrefresh(s2->win);
refresh();
getch();
endwin();
}