Début de la saeé

This commit is contained in:
lecointre
2025-11-25 13:12:45 +01:00
parent e9addbb184
commit 553532c887
15 changed files with 873 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
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