Train assembly algorithm

I recently bought a toy train for my child. And, having assembled it, I wondered if I could create an application in which you place what stands out and how many of them you have, and the result is a track diagram, while in a rented closed circuit. So my input will be how much each type I have, these are the types:

enter image description here

And the result will be something like this:

enter image description here

What algorithm can I use to implement it, and if you have any suggestions or pointers, please tell me.

+4
source share
1 answer

, , , . ,

Piece1-Piece2-Piece3 -...

Piece1-Piece3-Piece4 -...

Piece1-Piece4-Piece5 -...

...

( - ).

, , .

, , . , .

, , , "". , , , .

, , , , , , . , 4 16 , , 4 , - . , , , , .

. , , , .

+1

Source: https://habr.com/ru/post/1679241/


All Articles