/**
 * Created by michalsvacha on 21.02.17.
 */
public class Slice {
    int originX;
    int originY;
    int endX;
    int endY;

    int tomatoCount = 0;
    int mushroomCount = 0;

    public Slice(int originX, int originY, char ingredient) {
        this.originX = originX;
        this.originY = originY;
        this.endX= originX;
        this.endY = originY;
        this.addIngredient(ingredient);
    }

    public int size() {
        return (endX - originX) * (endY - originY);
    }

    public void addIngredient(char ingredient) {
        if (ingredient == 'T') {
            tomatoCount++;
        } else {
            mushroomCount++;
        }
    }

    public void removeIngredient(char ingredient) {
        if (ingredient == 'T') {
            tomatoCount--;
        } else {
            mushroomCount--;
        }
    }

    /**
     * Getters & Setters
     */

    public int getOriginX() {
        return originX;
    }

    public void setOriginX(int originX) {
        this.originX = originX;
    }

    public int getOriginY() {
        return originY;
    }

    public void setOriginY(int originY) {
        this.originY = originY;
    }

    public int getEndX() {
        return endX;
    }

    public void setEndX(int endX) {
        this.endX = endX;
    }

    public int getEndY() {
        return endY;
    }

    public void setEndY(int endY) {
        this.endY = endY;
    }

    public int getTomatoCount() {
        return tomatoCount;
    }

    public void setTomatoCount(int tomatoCount) {
        this.tomatoCount = tomatoCount;
    }

    public int getMushroomCount() {
        return mushroomCount;
    }

    public void setMushroomCount(int mushroomCount) {
        this.mushroomCount = mushroomCount;
    }
}

@@ -658,24 +658,28 @@
     %7D%0A    %7D%0A
+    
 %0A    public 
@@ -687,13 +687,13 @@
 oid 
-remov
+updat
 eIng
@@ -703,133 +703,274 @@
 ient
-(char ingredient) %7B%0A        if (ingredient == 'T') %7B%0A            tomatoCount--;%0A        %7D else %7B%0A            mushroomCount--;
+s(int origX, int origY, int endX, int endY, char%5B%5D%5B%5D pizza) %7B%0A        tomatoCount = 0;%0A        mushroomCount = 0;%0A%0A        for (int i = origX; i %3C endX; i++) %7B%0A            for (int j = origY; j %3C endY; j++) %7B%0A                addIngredient(pizza%5Bi%5D%5Bj%5D);%0A            %7D
 %0A   

Add update ingredients