package simulator;

import java.util.ArrayList;

public class Action {

    public static int numActions = 0;
    public static ArrayList<Constituent> ownerList = new ArrayList<Constituent>();

    public enum Status {Not_raised, Raised, Handled};

    private String name;
    private int ID;

    private int benefit;
    private int SoSBenefit;
    private int duration;
    private Status status;

    private Constituent performer = null; // Current performer

    public Action(String name, int benefit, int SoSBenefit){
        ++Action.numActions;
        this.ID = Action.numActions;
        this.name = name;
        this.benefit = benefit;
        this.SoSBenefit = SoSBenefit;
        this.duration = 2;
        this.status = Status.Not_raised;
    }

    public int getBenefit() {
        return this.benefit;
    }

    public int getSoSBenefit() {
        return this.SoSBenefit;
    }

    public void setPerformer(Constituent performer){
        if(this.performer == null){
            this.performer = performer;
            // Need of checking deleting performer
            // performer 가 항상 중복이 없다라고 가정할 수 있어야함.
            Action.ownerList.add(this.performer);
        }
    }

    public Constituent getPerformer(){
        return this.performer;
    }

    public String toString(){
        return this.name;
    }

    public int getDuration(){
        return this.duration;
    }

    public int getID(){
        return this.ID;
    }

    public String getName(){
        return this.name;
    }
}

@@ -270,28 +270,8 @@
 ame;
-%0A    private int ID;
 %0A%0A  
@@ -504,74 +504,8 @@
 t)%7B%0A
-        ++Action.numActions;%0A        this.ID = Action.numActions;%0A
     
@@ -1329,17 +1329,22 @@
 lic 
+Str
 in
-t
+g
  get
-ID
+Name
 ()%7B%0A
@@ -1367,10 +1367,12 @@
 his.
-ID
+name
 ;%0A  
@@ -1385,36 +1385,38 @@
    public St
-ring getName
+atus getStatus
 ()%7B%0A        
@@ -1419,30 +1419,32 @@
     return this.
-name
+status
 ;%0A    %7D%0A%7D%0A

Remove ID