3 #include<ncurses/curses.h>
9 #define rf() wrefresh(stdscr)
10 #define mv(x,y) wmove(stdscr,(y),(x))
17 using namespace std::filesystem
;
19 // !!! RUN `chcp 65001` on windows before running this program !!!
24 /* 1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,19,s1,cp,sdjc,dxjc, yz, fs, yf, 23 in all
25 * 1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,19,26,27,1001,1002,1003,1004,1005. */
26 int number_of_stations
;
28 string faas
; //File As A String
29 json faaj
; //File As A Json
33 ifstream
fmapin(filename
.append(".json"));
38 faas
.append(1,thisch
);
40 faas
.erase(faas
.length()-1);
44 faaj
=json::parse(faas
);
48 cerr
<<"Error while trying to parse the map file "<<filename
<<".json"<<endl
;
75 for(int _
=0;_
<COLS
;_
++)
80 for(int _
=0;_
<COLS
;_
++)
89 // didn't respond, this part of code is not yet ready
96 case KEY_UP
:case KEY_DOWN
:case KEY_LEFT
:case KEY_RIGHT
:
98 addstr("Sorry, the game currently does not support "
99 "\narrow keys. Use hjkl and yubn instead:\n"
109 addstr("Do you really want to quit? Press Q again to confirm: ");
112 if((ch
=getch())=='Q')
120 addstr("Well, okay then. ");
127 addstr("Unknown command. You typed: ");