Deletion implemented
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user