2048-homework/src/2048.h

26 lines
435 B
C

#include <stdint.h>
#include <stdlib.h>
#ifndef HEADER_2048
#define HEADER_2048
typedef enum Direction {
NoDirection,
Up,
Down,
Right,
Left
} Direction;
typedef struct Game
{
uint32_t score;
size_t field_size_x, field_size_y;
uint16_t **field;
} Game;
Game game_init(size_t field_size_x, size_t field_size_y);
uint8_t game_move(Game *game, Direction direction);
void game_destroy(Game game);
#endif