View Single Post
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 05-24-2012, 02:34 PM

Unfortunately, that is going to be very hard, probably harder than what you've done so far. The easiest way I can think of to do it is use 2 lists, one boolean for isRed/isBlack, and another representing the number of the area the piece occupies. Then, you need to have lots of if statements saying if 4 numbers next to each other horizontally are red/black, win, then do the same with vertically, and then diagonally, though that will be very hard. You're going to need some kind of algorithm to do it unless you want brute force programming, like if(#.IsBlack && #+1.IsBlack etc etc) for horizontal, then vertical and diagonal will be even harder

My train of though kind of went crazy there, so if you need clarification, feel free to ask. Unfortunately, there is no easy way to do what you're asking.


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote