private int getPoints(int row, int col, int color, int rowchange, int colchange)
    {
        int i = row, j = col, points = 0;
        while (true)
        {
            if (i < 0 || j < 0 || i > 7 || j > 7 || board[i][j] == EMPTY)
                return 0;
            else if (board[i][j] == color)
                return points;
            else
                points++;

            i += rowchange;
            j += colchange;
        }
    }