mirror of
https://github.com/ProgramSnail/rts_game_backend.git
synced 2026-01-25 12:57:08 +00:00
hello world 2 ncurses test
This commit is contained in:
parent
8de85dcd62
commit
ecf87e8c87
3 changed files with 9 additions and 3 deletions
Binary file not shown.
BIN
bin/Game
BIN
bin/Game
Binary file not shown.
12
main.cpp
12
main.cpp
|
|
@ -3,11 +3,17 @@
|
|||
#include <unistd.h>
|
||||
|
||||
int main() {
|
||||
size_t y;
|
||||
size_t x;
|
||||
initscr();
|
||||
noecho();
|
||||
mvprintw(0, 0, "Hello World!");
|
||||
refresh();
|
||||
sleep(1);
|
||||
curs_set(false);
|
||||
for (size_t i = 0; ; ++i) {
|
||||
clear();
|
||||
getmaxyx(stdscr, y, x);
|
||||
mvprintw(i % y, i % x, "Hello World!");
|
||||
refresh();
|
||||
usleep(30000);
|
||||
}
|
||||
endwin();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue