Try using "if, else" blocks that do different stuff according to the postitions of the other pieces of the board. Example: If the AI player is in check, he'll have to check if he'll still be in check if he moves to certain direction, until he finds a safe spot to move it's king to.
Offline
pixlepix wrote:
Well, that will work except it will do random moves the rest of th time. BTW the gme os more of a minatures game.
If you don't want random moves, then make the AI "think" about every possible move, then he'll choose the best one.
Offline
technoguyx wrote:
pixlepix wrote:
Well, that will work except it will do random moves the rest of th time. BTW the gme os more of a minatures game.
If you don't want random moves, then make the AI "think" about every possible move, then he'll choose the best one.
You can do that by putting them into a list and then, say it was a chess game. make it so that if you are in check to get out of check.that's just an example.
Offline
technoguyx wrote:
pixlepix wrote:
Well, that will work except it will do random moves the rest of th time. BTW the gme os more of a minatures game.
If you don't want random moves, then make the AI "think" about every possible move, then he'll choose the best one.
Pretty sure that was the way you do it, thanks.
Offline