Add some option mechanics

This commit is contained in:
Tiehuis
2014-12-06 12:57:07 +13:00
parent 569e11710f
commit b7c45f7f87
3 changed files with 87 additions and 14 deletions
+3 -3
View File
@@ -18,6 +18,8 @@ struct gameoptions {
long goal;
long spawn_value;
int spawn_rate;
int enable_color;
int animate;
};
struct gamestate {
@@ -30,11 +32,9 @@ struct gamestate {
int print_width;
/* Options */
struct gameoptions *opts;
/* Draw functions */
void (*ds_draw)(struct gamestate*);
void (*ds_clear)(void);
};
struct gameoptions* parse_options(struct gameoptions*, int, char**);
void gravitate(struct gamestate*, direction, void (*callback)(struct gamestate*));
void merge(struct gamestate*, direction, void (*callback)(struct gamestate*));
int moves_available(struct gamestate *);