private void setPoints(int row, int col, int color, int rowchange, int colchange)
    {
        int i = row, j = col;
        while (true)
        {
            if (i < 0 || j < 0 || i > 7 || j > 7 || board[i][j] == EMPTY)
            {
                return;
            }
            else if (board[i][j] == color)
                return;
            else
            {
//		    	  System.out.println(i + " " + j );
                board[i][j] = color;//change the color of that piece
            }
            i += rowchange;
            j += colchange;
        }
    }