public boolean isDuck(Position position){
        if (position.getX() >= 0 && position.getX() < field.getXLength() && position.getY() >= 0 && position.getY() < field.getYLength()) {
            if(field.getItemType(position)=='D')return true;
        }
        return false;
    }