From bc3932d43234103621299e20b22d0dd693fb8ea4 Mon Sep 17 00:00:00 2001 From: Jeeves Date: Tue, 29 Apr 2025 06:46:27 -0600 Subject: [PATCH] clean up old comments --- src/main.zig | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/src/main.zig b/src/main.zig index 60d646f..744a71f 100644 --- a/src/main.zig +++ b/src/main.zig @@ -73,39 +73,6 @@ pub fn main() !void { try circuit.connectComponents(&and2.component, 0, &or2.component, 2); try circuit.tick(); - - // battery1.component.process(); - // battery2.component.process(); - // battery3.component.process(); - // not1.component.process(); - // or3.component.process(); - // or6.component.process(); - // and1.component.process(); - // or1.component.process(); - // or4.component.process(); - // or7.component.process(); - // and2.component.process(); - // or2.component.process(); - // or5.component.process(); - // or8.component.process(); - - // std.debug.print("Input:\n{}\n\n", .{input}); - // std.debug.print("{}\n{}\n\n", .{ - // or1.component.outputs.items[0].signal, - // or2.component.outputs.items[0].signal, - // }); - // std.debug.print("{}\n{}\n{}\n\n", .{ - // or3.component.outputs.items[0].signal, - // or4.component.outputs.items[0].signal, - // or5.component.outputs.items[0].signal, - // }); - // std.debug.print("{}\n{}\n{}\n{}\n{}\n\n", .{ - // or6.component.outputs.items[0].signal, - // and1.component.outputs.items[0].signal, - // or7.component.outputs.items[0].signal, - // and2.component.outputs.items[0].signal, - // or8.component.outputs.items[0].signal, - // }); } pub const Circuit = struct { @@ -125,7 +92,6 @@ pub const Circuit = struct { } pub fn deinit(self: *Circuit) void { - // std.debug.print("process_order.len {d}\n", .{self.process_order.?.len}); if (self.process_order) |p| self.allocator.free(p); for (0..self.components.items.len) |i| self.components.items[i].deinit(self.allocator); self.components.deinit(self.allocator); @@ -184,7 +150,6 @@ pub const Circuit = struct { // check each connection of the current output connections: for (output.connections.items) |connection| { const new_idx = self.componentIndex(connection.component).?; - // std.debug.print("{}@{d}\n", .{ connection, new_idx }); // check if component is "ready" // i.e. it hasn't already been added to the process list, but all its inputs have. @@ -207,12 +172,9 @@ pub const Circuit = struct { } component_idx = stack.pop() orelse break :dfs; - // std.debug.print("backtracking to {}\n", .{component_idx}); } } - // std.debug.print("{any}\n", .{visited}); - if (self.process_order) |p| self.allocator.free(p); self.process_order = try process_order.toOwnedSlice(); }