public void placePieceOnBoard(Position myFreeposition, List<Position> freePositions) {
        freePositions.remove(myFreeposition);
        int x = myFreeposition.getX();
        int y = myFreeposition.getY();
        Position tmp = new Position(x, y);
        for (int xx = x, yy = y; xx < did.getN() && yy < did.getM();) {
            tmp.setX(xx++);
            tmp.setY(yy++);
            freePositions.remove(tmp);
            freePositions.remove(tmp);
        }
        for (int xx = x, yy = y; xx > 0 && yy > 0;) {
            tmp.setX(--xx);
            tmp.setY(--yy);
            freePositions.remove(tmp);
            freePositions.remove(tmp);
        }
        for (int xx = x, yy = y + 1; xx < did.getN() && yy > 0;) {
            tmp.setX(xx++);
            tmp.setY(--yy);
            freePositions.remove(tmp);
            freePositions.remove(tmp);
        }
        for (int xx = x + 1, yy = y; xx > 0 && yy < did.getM();) {
            tmp.setX(--xx);
            tmp.setY(yy++);
            freePositions.remove(tmp);
            freePositions.remove(tmp);
        }
    }