This commit is contained in:
lecointre
2025-11-30 15:13:09 +01:00
parent c3f8f064ec
commit 7da24e557e
14 changed files with 9 additions and 897 deletions
-54
View File
@@ -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