After watching iRobots, and against my better judgment I decided to give my program a brain to play against me.
In a player's turn, the player can choose to execute 10 different actions (each its own procedure).
For each computer player, randomize True Or False 10 times, if True, call corresponding procedure, else generate next random. So it decides for itself to carry out that action or not.
ie
for x = 1 to 10
generate true or false
if true then
call whatever the first procedure is
call the 2nd procedure if x = 2
and so on to 10
Else
'do nothing
End If
Next
Any ideas?
Maybe I just random the strings True and False?
I would probably need to make some sort of a list to match the value of x to my procedure names.
In a player's turn, the player can choose to execute 10 different actions (each its own procedure).
For each computer player, randomize True Or False 10 times, if True, call corresponding procedure, else generate next random. So it decides for itself to carry out that action or not.
ie
for x = 1 to 10
generate true or false
if true then
call whatever the first procedure is
call the 2nd procedure if x = 2
and so on to 10
Else
'do nothing
End If
Next
Any ideas?
Maybe I just random the strings True and False?
I would probably need to make some sort of a list to match the value of x to my procedure names.