Deletion implemented

This commit is contained in:
2026-04-29 15:52:33 +02:00
parent 750bad7f83
commit db16bafd6c
8 changed files with 171 additions and 22 deletions

View File

@@ -19,7 +19,9 @@ pub fn main(init: std.process.Init) !void {
rl.setTargetFPS(rl.getMonitorRefreshRate(monitor));
var sim: Simulator = .init(allocator);
defer sim.deinit();
defer sim.deinit() catch |err| {
std.debug.panic("Failed to deinitialise the sim: {}\n", .{err});
};
while (!rl.windowShouldClose()) {
rl.beginDrawing();
@@ -27,6 +29,7 @@ pub fn main(init: std.process.Init) !void {
const pos = rl.getMousePosition();
sim.handleInput(pos);
sim.update(pos);
sim.draw(pos);
}