AI and array

For questions about using Classic.

Post » Mon Nov 12, 2012 10:32 pm

I'm working on a simple A.I
my project has:
-1 array (4,1,1)
-1 player button
-1 AI button

on start of layout; I filled my array:


my array
0:1
1:1
2:1
3:1

//Player turn Player click on buttonP1


// if 3
my array after this event
0:1
1:1
2:0
3:1


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



How can i do that?

http://goldbraver.com/asikanddestroy.capxasikanddestroy2012-11-12 22:36:05
B
7
S
2
G
1
Posts: 5
Reputation: 1,242

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests