2010-03-31 05:21:17 +00:00
|
|
|
#include <ncurses.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
#include <string.h>
|
2010-04-05 00:44:31 +00:00
|
|
|
#include "../lib/display.h"
|
2010-03-31 05:21:17 +00:00
|
|
|
|
|
|
|
int main(int argc, const char *argv[]) {
|
|
|
|
char message[] = "Welcome to tty-solitaire.";
|
|
|
|
int row_number, column_number;
|
|
|
|
|
2010-04-03 18:26:21 +00:00
|
|
|
init_curses();
|
2010-03-31 05:21:17 +00:00
|
|
|
|
|
|
|
getmaxyx(stdscr, row_number, column_number);
|
|
|
|
mvprintw(row_number / 2 - 1,
|
|
|
|
(column_number - strlen(message)) / 2,
|
|
|
|
"%s\n",
|
|
|
|
message);
|
2010-04-01 06:07:48 +00:00
|
|
|
getch();
|
2010-03-31 05:21:17 +00:00
|
|
|
|
|
|
|
endwin();
|
2010-04-03 03:32:19 +00:00
|
|
|
|
2010-03-31 05:21:17 +00:00
|
|
|
puts("Game finished.");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|