Moving cursor declaration to the game file.

* Also moving some functions around.
This commit is contained in:
Murilo Pereira
2011-02-06 00:15:21 -02:00
parent 58fff35a20
commit a8c98d4756
4 changed files with 18 additions and 20 deletions

View File

@@ -195,21 +195,22 @@ void greet_player() {
return;
}
void prepare_game(struct deck **deck) {
draw_empty_stacks();
allocate_deck(deck);
initialize_deck(*deck);
set_stacks_coordinates(*deck);
fill_deck(*deck);
shuffle_deck(*deck);
deal_cards(*deck);
return;
}
void initialize_game() {
clear_screen();
prepare_game(&deck);
allocate_cursor(&cursor);
initialize_cursor(cursor);
allocate_deck(&deck);
initialize_deck(deck);
set_stacks_coordinates(deck);
fill_deck(deck);
shuffle_deck(deck);
deal_cards(deck);
draw_empty_stacks();
draw_cursor(cursor);
draw_game(deck);
return;

View File

@@ -2,6 +2,7 @@
#define GAME_H
#include "deck.h"
#include "cursor.h"
#define NUMBER_OF_CARDS 52
@@ -27,6 +28,7 @@
#define MANEUVRE_6_STARTING_X 49
struct deck *deck;
struct cursor *cursor;
void set_stacks_coordinates(struct deck *);
void fill_deck(struct deck *);
@@ -34,7 +36,6 @@ void shuffle_deck(struct deck *);
void deal_cards(struct deck *);
void greet_player();
void initialize_game();
void prepare_game(struct deck **);
void end_game();
#endif

View File

@@ -3,7 +3,6 @@
#include "keyboard.h"
void mark_origin(struct cursor *cursor) {
return;
}