Unity Wire puzzle issues

I’m currently working on a 2d puzzle game. One of the puzzles is kind of like that number game where you have a 3x3 grid with 8 number tiles and the goal is to get the numbers in the right order. Except rather than numbers it’s wires, and you have to connect the wires to where the start point and end point meet. Originally I just figured I could see if the pieces were in the right place but now I realize there are more than one winning combination. I have the tiles setup and the board I just need to have a detection system to tell if you’ve won or not. I’m pretty new to coding so I have no idea how to do this and I really don’t want to go through and find every winning combination. let me know your ideas! Also not really sure if this is the right category to post this in but it is a 2d game so that was my reasoning lol.

9276798--1299330--1275435-5dd383a3c46f7340b46afade27a8bea3.png

I would just attempt to traverse the wire field from beginning to end.

The points on your node are always the midspans of the edge of a tile, so it’s just like a mouse navigating the maze.

  • start the mouse at one terminal pointing inwards

  • observe the next tile and put data (perhaps fields?) on it that specify where it connects to

  • if it connects in the “from” direction where you are standing, advance your agent to the exit. Be sure to turn if necessary.

  • if it does not, then there is no connection

  • if you reach the goal you are done

If you want tips on processing an arbitrary field of data and looking for matches / connections / combinations, you’re welcome to check out my Match3 game and how it studies the board for hints about possible moves.

Fully-playable here, plus source code and full project linked in the comments.