From fc83da462e49fadfc55108a30069c425ed0ba232 Mon Sep 17 00:00:00 2001 From: Murilo Soares Pereira Date: Thu, 1 Apr 2010 03:07:48 -0300 Subject: [PATCH] Cleaned up main file. --- src/tty-solitaire.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/tty-solitaire.c b/src/tty-solitaire.c index da16351..78d1193 100644 --- a/src/tty-solitaire.c +++ b/src/tty-solitaire.c @@ -6,9 +6,7 @@ int main(int argc, const char *argv[]) { char message[] = "Welcome to tty-solitaire."; - int ch; int row_number, column_number; - struct card *card = NULL; initscr(); /* initialize the terminal in curses mode */ raw(); /* disable line buffers */ @@ -20,33 +18,7 @@ int main(int argc, const char *argv[]) { (column_number - strlen(message)) / 2, "%s\n", message); - - card = initialize_card(); - - set_card(card, KING, CLUBS, TRUE, 1, 1); - - refresh_card(card); - - while ((ch = getch()) != KEY_F(1)) { - switch(ch) { - case KEY_LEFT: - case 'h': - refresh_card(card); - break; - case KEY_RIGHT: - case 'l': - refresh_card(card); - break; - case KEY_UP: - case 'k': - refresh_card(card); - break; - case KEY_DOWN: - case 'j': - refresh_card(card); - break; - } - } + getch(); endwin(); puts("Game finished.");