I have a dictionary of
<id, List<Action>>
Where the id is the person id and the list is a list of the actions that this person can do now.
From this dictionary i wish to create a
List<List<Action>>
that will hold all of the permutations that the group can do.
For example if we have this:
<1, {(1,Left), (1,Right)}>
<2, {(2,Left), (2,Right), (2,Back)}>
I wish to generate this:
[{(1,Left),(2,Left)},
{(1,Left),(2,Right)},
{(1,Left),(2,Back)},
{(1,Right),(2,Left)},
{(1,Right),(2,Right)},
{(1,Right),(2,Back)}]
How can i do this?
With regards,
Aviel.