Coming up with 256 Permutations?
I need to come up with an array of 256 permutations for this project I'm working on.
http://i.imgur.com/8PivX.png
I need an array of:
Code:
xxxx xxxx
xxxx oxxx
xxxx ooxx
xxxx ooox
xxxx oooo
.........
oxxx xxxx
oxxx oxxx
oxxx ooxx
oxxx ooox
oxxx oooo
.........
I know I can do this with 8 nested For Loops but I'm curious if there is another way! Thank you!
Re: Coming up with 256 Permutations?
I guess this works:
Code:
Dim Options() As String = {"xxxx", "oxxx", "ooxx", "ooox", "oooo", "xooo", "xxoo", "xxxo", "oxxo", "ooxo", "xoxo", "xoxx", "xoox", "xxox", "oxox", "oxoo"}
For x As Integer = 0 To 15
For y As Integer = 0 To 15
Debug.Print(Options(x) & " " & Options(y))
Next
Next
Still curious as to other solutions