This commit is contained in:
Gwenhael Le Moine 2011-07-01 19:21:02 +02:00
parent 6cd428d31c
commit 81d4eca04b

24
star.c
View file

@ -269,26 +269,26 @@ enum {
}; };
typedef enum { typedef enum {
WALL ='#', WALL = '#',
BALL ='@', BALL = '@',
CUBE ='H', CUBE = 'H',
VOID =' ', VOID = ' ',
GIFT ='x' GIFT = 'x'
} cell; } cell;
typedef enum { typedef enum {
UP ='u', UP = 'u',
DOWN ='d', DOWN = 'd',
LEFT ='l', LEFT = 'l',
RIGHT ='r' RIGHT = 'r'
} direction; } direction;
struct state { struct state {
char board[ LEVEL_HEIGHT * LEVEL_WIDTH ]; char board[ LEVEL_HEIGHT * LEVEL_WIDTH ];
char moving; char moving;
int moves; int moves;
int level; int level;
int nb_levels; int nb_levels;
}; };
int count_gifts( struct state *s ) int count_gifts( struct state *s )