update game print with g->height and g->width

This commit is contained in:
Théophyl Hoguet committed 2021-12-10 14:46:24 +01:00
1 parent b48d52bb6b
commit 4f5a7b358c
1 file changed
+5 -5
+5 -5
View File
@@ -15,23 +15,23 @@ void game_print(cgame g) {
if (g != NULL) {
uint i;
printf(" 0");
for (i = 1; i < DEFAULT_SIZE; i++) {
for (i = 1; i < g->width; i++) {
printf("%u", i);
}
printf("\n -");
for (i = 1; i < DEFAULT_SIZE; i++) {
for (i = 1; i < g->width; i++) {
printf("-");
}
printf("\n");
for (i = 0; i < DEFAULT_SIZE; i++) {
for (i = 0; i < g->height; i++) {
printf("%u |", i);
for (uint j = 0; j < DEFAULT_SIZE; j++) {
for (uint j = 0; j < g->width; j++) {
printf("%c", charPrintCell(g, i, j));
}
printf("|\n");
}
printf(" -");
for (i = 1; i < DEFAULT_SIZE; i++) {
for (i = 1; i < g->width; i++) {
printf("-");
}
printf("\n");