The way that I decided to approach the problem was by writing a small function for each direction so that I can handle combinations of flanks rather than just one at a time. Right now it'll flip pieces some of the time, so I need to find out when it is that it decides flipping pieces is a good idea and go from there. When you write a function you think, "Man, this is great, this will do just what I want." Well, the computer seems to have different ideas and of course it doesn't work quite as planned.
I was watching MTV2 earlier and there was a pretty neat show on called "Video Mods".
For those of you who may not have seen it, they get video game characters and have them singing to songs. I suppose they get motion capture done for all the movements and just plug in the appropriate characters. It's pretty well done, I think.
Some are funny, some kind of suck. One of the best videos they had that attempted to recreate an existing video used Sims 2 characters (not sure if they all use the actual game engines, or just the characters) to recreate the Fountain's of Wayne video, "Stacey's Mom". They did really well with that one. The funniest video though had to be some rap video that used SSX3, especially Bigfoot. It was great seeing him "get down with his bad self", for lack of a better phrase.
Ah well, back to coding for now.