public int getNumberOfItems(char type) {
        int number = 0;
        for (int i = 0; i < field.length; i++) {
            for (int j = 0; j < field[0].length; j++) {
                if (type == getItemType(new Position(i, j))) {
                    number++;
                }
            }
        }
        return number;
    }