View Single Post
Old Jan 8th, 2006, 8:35 AM   #2
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
This is no hep whatsoever, but nevermind :-) :
if (two player cells are in a row)
{
   block_a_cell();
}
else
{
  if(two player cells are in a row && there is a space to go in the next cell)
  {
     move_in_a_cell();
   }
   else if (one player cell is on its own && there are two spaces)
   {
        move_in_a_cell();
   }
   else if (there are three empty spaces)
   {
        move_in_a_cell();
   }
   else
   {
      move_in_a_random_cell();
   }
}

Obviously thats far from perfect, and its not completed or even in VB. And there are much better ways than that, but thats just my idea :-)
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote