Artificial Intelligence?

I'm trying to make a turn based two player game that would have a few different modes of play. One mode would enable you to play against the computer. How would I make this possible? Also, another thing I need for my game is to be able to connect dots by touching a dot other than the one that your player happens to be on. This would make the player move. Anyone know? Thanks.
Comments
To do this basically you could have an attribute (integer) called 'response' (or whatever you wish to call it). When the computer player is attacked, change attribute game.response to a random number between 1 and 5. Then have rules on the computer player actor like: if game.response = 1 or 2, take the hit (lose life, play hit animation). If game.response = 3 or 4, defend (no loss of life, play defend animation). If game.response = 5, counter (no loss of life, inflict damage, play counter animation)
Does this make sense?
Give each dot a seperate x and y coordinate game attribute, for instance
1x and 1y and a seperate attribute for move that would be a boolean called dot1
Inside the dot actor change/constrain attribute game.1x to self.position.X and game.1y to self.position.Y
When you press on the dot create a rule that says when pressed change attribute dot1 to true.
then inside your character actor create a rule that says: when attribute dot 1 is true
move character to game.1x and game.1y
I hope this helps!
Jason
Making the world better one pixel at a time!
My Website
Over 70 AWESOME Gamesalad Templates by me!
HIRE ME!