![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | hjiul |
Hello,
I need a little help for a piece of code I am doing. I am convinced it is relatively easy to do and would just involve some nested ‘for loops’ but I cannot visualize how to put it together :
My game has a ship generator.
6 families of ships, lets call them : A, B,C,D,E,F
each boat has 6 different parts, lets call them : 1, 2 ,3 ,4 , 5 , 6
I have a dictionnarie shipParts = {
‘A’ : {
‘1’:‘’,
‘2’:‘’.
…
‘B’: {
‘1’:‘’,
‘2’:‘’.
…
The id For each ship is build Related to each part it has in order {1,2,3,4,5,6}.
So it could be ‘AAAAAA’ or ‘ABACCD’ or ‘FFBADC’
You get the idea.
My generator is working fine but now i would love a small script that generate a dictionnary with all possible ids :
AAAAAA
AAAAAB
AAAAAC
…
Anyone could help me with that ?
I cannot help to think that is should not be very hard but Its making my brain bug since 1h so Here I am humbly asking for a hand
Thanks