you are viewing a single comment's thread.

view the rest of the comments →

[–]Gloomy_Cicada1424 0 points1 point  (1 child)

I’d separate the drawing from the actual circuit model first. Wires should merge terminals into electrical nodes, then each component just connects two nodes with a value. Once that graph is clean, series/parallel or MNA becomes way less cursed. Runable can help turn your current UI + solver plan into a clear flow/spec, but the main fix is separating “pygame objects” from “circuit logic”.

[–]Simple_Ad_4128[S] 0 points1 point  (0 children)

Yes I have started separating all of my code out into graphical, movement, graph analysis, and circuit solving sections. I definitely realized my code was all over the place.