Refactored board size calculation

The calculation doesn't depend on anything in the getStones() function so i moved that out of there.