public class GameBoard
{
    // package access for testing
    Space[][] board;

    public int getPointsForRow(int targetRow)
    {
        int points = 0;
        boolean allSameColor = true;

        for(int c = 0; c < board[0].length; c++)
        {
            points += board[targetRow][c].getPoints();

            if( ! board[targetRow][c].getColor().equals(
                    board[targetRow][0].getColor()) )
            {
                allSameColor = false;
            }
        }

        if(allSameColor)
            points *= 2;

        return points;
    }
}
