Skip to content

Commit

Permalink
Move cursor and deck variable definitions to game.c
Browse files Browse the repository at this point in the history
  • Loading branch information
mpereira committed Nov 3, 2021
1 parent 4cc3d9c commit 7958cea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down
2 changes: 0 additions & 2 deletions src/deck.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down
3 changes: 3 additions & 0 deletions src/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7958cea

Please sign in to comment.