Professional Documents
Culture Documents
Cocangua
Cocangua
h>
return true;
}
// Vẽ ô
SDL_Rect tileRect = { x, y, TILE_SIZE, TILE_SIZE };
SDL_RenderFillRect(gRenderer, &tileRect);
}
}
if (!init()) {
printf("Failed to initialize SDL!\n");
return -1;
}
if (!loadMedia()) {
printf("Failed to load media!\n");
return -1;
}
if (board.horses[0].posX == -1) {
quit = true; // Thoát khỏi vòng lặp chính
}
renderBoard(board);
}
close();
return 0;