I'm developing a simple noughts & crosses game where the player plays against the computer.
Obviously, I use the Randomize function of the language, however, the final stage of refinement is to try to get the computer to block my winning move (as you normally would in a real game). This, of course, requires more intelligence on the part of the computer.
So far, I've just thought up of all the permutations one could have and built this into a large selection structure. This, as you can imagine, sees a lot of if / case statements.
Is there a smarter way of creating a noughts & crosses AI than simply outlining all the possible winning moves?