galenscovell / Circuits

Circuit connecting puzzle game for Android
0 stars 0 forks source link

Implement bridge collision detection #7

Closed galenscovell closed 9 years ago

galenscovell commented 9 years ago

'Bridges' from each node cannot intersect, so there needs to be a method for preventing this from occurring.

galenscovell commented 9 years ago

During bridge creation, all passed cells are amassed and - if path ends in a cell containing a node - are marked as 'bridged'. During bridge creation if at any time a cell that is already bridged is passed through, the process ends, preventing bridge intersection.