I enjoy writing this kind of game. I usually break it down into a few simple bits:
1. An array to store the positions and one or more temporary arrays for calculations.
2. An algorithm to check if a move is valid and return the changed state
3. Another to evaluate a position. For example, it might return a value between -9000 and +9000 where either extreme is a win and a zero means both players are even.
4. One to render the graphics, preferably with irritating animation and noise.
5. User interface to get the input
6. The "brains" - I start with a 2 player mode only just to prove the basics are good, then add the interesting logic. It's often ridiculously simple, which explains why my AIs are so weak

_________________jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."
When you're feeling too silly for x404,
youRwired.net