Added unit tests

This commit is contained in:
2026-05-26 13:38:15 +02:00
parent 3232e4f44f
commit 4da59836be
7 changed files with 409 additions and 11 deletions
+12 -3
View File
@@ -25,12 +25,21 @@ int main() {
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "2048");
SetTargetFPS(30); // So my laptop doesn't burn
SetTargetFPS(90); // We have event blocking so we can affort higher FPS
EnableEventWaiting();
while (!WindowShouldClose()) {
ClearBackground(RAYWHITE);
BeginDrawing();
render(&game_state);
ClearBackground(RAYWHITE);
// If we are not animating, we can wait for input events instead of continuously rendering
bool animating = render(&game_state);
if (animating) {
DisableEventWaiting();
} else {
EnableEventWaiting();
}
EndDrawing();
handle_mouse_input(&game_state);
handle_keyboard_input(&game_state);