|
-
Feb 24th, 2009, 07:56 PM
#11
Fanatic Member
Re: seeking help with a project.......!, Gomoku or 5 in a row Game
Let me throw some code at it and see what happens.
I have an Idea on how to scan. Out of the 2700 possible win combos, the only ones that can win at any given time is the ones that contain a computer token (lets say X), and no O's. Any Combo's that has only O's and no X's pose a threat and need to be capped. The ones with the more O's pose the biggest threat. 4-O's require an immediate response. Any combo with 4 X's are an immediate win and should be checked for first. If the max O count ( of any O only combo) is greater the max X count ( of any X only combo) you defend. If the Max X count is greater than O count you attack.
Using the same code as the check routine you can check for a masked matrix value >0 for both player and computer and isolate the combos that matter, and ignore the rest.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|