My solution is found in the MyPlayer folder. We had to design a program to play the pen and paper game dots and squares.
The solution finds "chains" of squares which can be take one after another, and chooses the longest chain at any point to try get the highest score. It could be improved by allowing it to sacrafice a square in order to force the opponent to create a larger chain for you. The solution includes some tests in MyPlayer/test