Move cursor and deck variable definitions to game.c

This commit is contained in:
Murilo Pereira 2021-11-03 13:56:03 +01:00
parent 4cc3d9c070
commit 7958cea858
3 changed files with 3 additions and 4 deletions

View File

@ -8,8 +8,6 @@
#include "game.h"
#include "common.h"
struct cursor *cursor;
void cursor_malloc(struct cursor **cursor) {
if (!(*cursor = malloc(sizeof(**cursor)))) {
tty_solitaire_generic_error(errno, __FILE__, __LINE__);

View File

@ -5,8 +5,6 @@
#include "deck.h"
#include "common.h"
struct deck *deck;
void deck_malloc(struct deck **deck) {
if (!(*deck = malloc(sizeof(**deck)))) {
tty_solitaire_generic_error(errno, __FILE__, __LINE__);

View File

@ -13,6 +13,9 @@
#include "gui.h"
#include "stack.h"
struct deck *deck;
struct cursor *cursor;
static int foundation_begin_x(int x) {
switch (x) {
case 0: