Added code to keep squares in a single group.
There's an error where inGroup doesn't catch the disconnection where it looks like:
 *          *
** *  -->  * **
*  *       *  *
The square at fault doesn't go back, and inGroup returns false for every move tried.