Menu
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
Baptiste LECOINTRE <baptou.lecointre@gmail.com>
|
||||
|
||||
12:59 (il y a 0 minute)
|
||||
|
||||
|
||||
À moi
|
||||
|
||||
#ifndef GAME_H
|
||||
|
||||
#define GAME_H
|
||||
|
||||
|
||||
struct GameState {
|
||||
|
||||
int rows;
|
||||
|
||||
int cols;
|
||||
|
||||
int empty_index;
|
||||
|
||||
int moves;
|
||||
|
||||
int is_over;
|
||||
|
||||
int *permutation;
|
||||
|
||||
};
|
||||
|
||||
|
||||
void game_init(struct GameState* state, int rows, int cols);
|
||||
|
||||
void game_move(struct GameState* state, int tile);
|
||||
|
||||
int game_can_move(const struct GameState* state, int tile);
|
||||
|
||||
int game_is_solved(const struct GameState* state);
|
||||
|
||||
void game_shuffle(struct GameState* state);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef GAME_VIEW_H
|
||||
|
||||
#define GAME_VIEW_H
|
||||
|
||||
|
||||
#include "game.h"
|
||||
|
||||
|
||||
void render_game(const struct GameState* state);
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user