game equal missed a game_default

This commit is contained in:
Théophyl Hoguet committed 2022-01-11 19:24:21 +01:00
1 parent 3e633347d4
commit 5cc29e88e0
1 file changed
+2 -2
+2 -2
View File
@@ -60,8 +60,8 @@ game game_copy(cgame g1) {
bool game_equal(cgame g1, cgame g2) { bool game_equal(cgame g1, cgame g2) {
if (g1->height != g2->height || g1->width != g2->width || g1->wrapping != g2->wrapping) if (g1->height != g2->height || g1->width != g2->width || g1->wrapping != g2->wrapping)
return false; return false;
for (int i = 0; i < DEFAULT_SIZE; i++) { for (int i = 0; i < g1->height; i++) {
for (int j = 0; j < DEFAULT_SIZE; j++) { for (int j = 0; j < g1->width; j++) {
if (g1->tab_cell[i][j] != g2->tab_cell[i][j]) { if (g1->tab_cell[i][j] != g2->tab_cell[i][j]) {
return false; return false;
} }