Author here. Yeah, the first level is special and perhaps half-baked. It felt like cheating to start with the NAND-gate as the atomic component since transistors are not NAND-gates. So I start with electric relays (since they logically correspond to transistors but are easier to visualize). But I didn't want to get into realistic simulation of electronic circuits with all the complexity this entails.
May I ask how you would have preferred to solve the first level if the game didn't have limitations?
Is your problem with the user interface, i.e. how to connect wires from input to output, or is is with the logical problem of getting the correct output?
I'm not using canvas. SVG is used for the connections, the rest is HTML. I'm not using any particular library for the diagrams, since I couldn't find anything suiting my purpose unfortunately.
I would definitely like to improve the look of the wires.
Author here - It uses TypeScript and the Angular framework. Not because I prefer Angular in particular but because I had to learn it anyway for a work-related project. I think TypeScript is great.
Code goes into how logic gates like the nand gate are built, so it does start at a lower level than Nand to Tetris which start with nand gates as primitives.
Yeah it currently only compares the solutions towards the minimum number of components of any type. I also intend to compare against the minimum number of nand gates overall, but this is not yet supported.
Thank you for finding the bugs! It shouldn't even be possible feed a 5 to a one-bit connector.
Yes I think I shot myself in the foot by designing the connectors so the labels could only be one or two letters. There is no technical reason they couldn't have descriptive labels like "clock" rather than "c". But it would probably require to turn the design "on the side", so the connectors are left-right rather than top-bottom.
May I ask how you would have preferred to solve the first level if the game didn't have limitations?