Widget Minigame

I want to add to my game a widget minigame where you rotate lines so you can go from 1 end of the screen to the other (I know that’s not a very good or clear explanation so I’m basically trying to make this game:https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/net.html)
I do have some ideas for how to do it such as just placing many image components on the canvas panel and on event construct set every image component to 1 of 5 maybe 6 images (I’m not sure how many are there going to be) but that doesn’t really sound very optimal or like something that’s going to work very well (or at all) so if you have any ideas how I can make it id greatly appreciate it. If you need any further info just ask me. Thanks in advance.