moved struct on game.h + debug game equal

This commit is contained in:
nessar committed 2021-12-10 14:18:10 +01:00
1 parent f61621a927
commit 5001605391
3 files changed
+8 -7

No files matched your search

-7
View File
@@ -2,13 +2,6 @@
#include <stdio.h>
#include <stdlib.h>
struct game_s {
square** tab_cell;
bool wrapped;
uint height;
uint width;
};
game game_new(square* squares) {
game g = game_new_empty();
for (int i = 0; i < DEFAULT_SIZE; i++) {
+7
View File
@@ -58,6 +58,13 @@ typedef enum {
/** square mask used in square enum */
#define A_MASK 0xFF
struct game_s {
square** tab_cell;
bool wrapped;
uint height;
uint width;
};
/**
* @brief The structure pointer that stores the game state.
**/
+1
View File
@@ -162,6 +162,7 @@ bool test_game_default_solution(void) {
game_set_square(g1, 5, 5, S_LIGHTBULB);
game_set_square(g1, 6, 1, S_LIGHTBULB);
game_update_flags(g1);
game_update_flags(g);
assert(game_equal(g, g1));
game_delete(g);
game_delete(g1);