I'm working on a simple A.I
my project has:
-1 array (4,1,1)
-1 player button
-1 AI button
<font color=blue>on start of layout; I filled my array:</font>
<img src="http://i.imgur.com/8QAwu.png" border="0" />
<font color=blue>
my array
0:1
1:1
2:1
3:1
</font>
<font color=blue>//Player turn Player click on buttonP1</font>
<img src="http://i.imgur.com/8x8qx.png" border="0" />
<font color=blue>// if 3
my array after this event
0:1
1:1
2:0
3:1
</font>
Now, I would like to choose two random index where value= 1
after AI turn, it should be like this:
0:1
1:0
2:0
3:0
or
0:0
1:1
2:0
3:0
etc...
I tried with
<img src="http://i.imgur.com/DgQCK.png" border="0" />
How can i do that?
goldbraver.com/asikanddestroy.capx