I had an attempt at a chess program a long while back, due to memory constraints the method (for one ply deep) was to play all possible moves for a peice and keep the one move that scored the most, then try all the moves for another peice and keep the best scoring move from that etc, eventualy you have a short list for all 16 peices with the best move and its score, then you pick the best score, OR in the case of a tie the best score from the lowest value peice, nowdays with more memory it might be best to keep the results for the top ten moves or whatever, since the more plys you go you might find a winning combination that looks initialy weak (ie no gain for two or three moves)
The trouble with one ply is you can set traps for the AI very easily, 2 ply is minimum and very weak, the more plys you use then the better the gameplay, the trouble is that for two ply you need to keep the moves for all peices and then play the moves for the other side, then play all the moves for the remaining peices and get the final score from them (final, not total), its best to play one peice at a time and all it`s consequent moves, don`t forget you need to move all the other peices you have to all legal postions to check for positions where you peice is protected etc, you also need to add a ranking to the score for the position the peices end up in too, the middle of the board is a stronger position than the edge for example, first thing you need is a list of the values for each peice and the board positions for them, the value of the board squares according to what moves are possible for the peices, it`s one program that REALY requires a design document thats well thought out just for the AI part, or you get nowhere fast, you can just use a text array and input for the initial "board", get the gameplay right and its easy to convert it to a graphical representation afterwards.
Is a Troll actualy a Chav who`s on the net?, are Chavs capable of using the net? if they are, what idiot trained em?