After receiving several requests to make the "sweep" functions public, I
have now done so. However, I recommend that you do NOT use them. You may
if you wish, but they have several "quirks" you must work around. In my
opinion, it will probably take as much effort to get these functions
working correctly for you as it would just to write your own. The sweep
functions are designed to sweep the entire game board. For makeMove(), you
do not need to sweep the whole board. You just need to search in the eight
compass directions from where the piece is being placed. If you use the
sweep functions, you will notice that they wrap around the edges of the
board, and they also "visit" locations that are not on the board. You will
have to take all of that into account, because those are two things you
don't want to do in makeMove().
Alexander