package simsos.scenario.mci;

import simsos.simulation.component.Action;
import simsos.simulation.component.Agent;
import simsos.simulation.component.World;

import java.util.HashMap;

/**
 * Created by mgjin on 2017-06-28.
 */
public class PTS extends Agent {
    private String name;

    public PTS(World world, String name) {
        super(world);

        this.name = name;
        this.reset();
    }

    @Override
    public Action step() {
        return null;
    }

    @Override
    public void reset() {

    }

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

    @Override
    public HashMap<String, Object> getProperties() {
        return null;
    }
}

@@ -176,16 +176,41 @@
 HashMap;
+%0Aimport java.util.Random;
 %0A%0A/**%0A *
@@ -291,27 +291,130 @@
 private 
-String name
+enum Status %7BWaiting, OnRescue%7D%0A%0A    private String name;%0A    private Status status;%0A    private Location location
 ;%0A%0A    p
@@ -582,68 +582,389 @@
     
-return null;%0A    %7D%0A%0A    @Override%0A    public void reset() %7B%0A
+if (this.status == Status.Waiting)%0A            return Action.getNullAction(1, %22Waiting%22);%0A        else // if (this.status == Status.OnRescue)%0A            return Action.getNullAction(1, %22Move%22);%0A    %7D%0A%0A    @Override%0A    public void reset() %7B%0A        Random rd = new Random();%0A%0A        this.status = Status.Waiting;%0A        this.location = new Location(rd.nextInt(9), rd.nextInt(9));
 %0A   
@@ -1127,19 +1127,44 @@
 return n
-ull
+ew HashMap%3CString, Object%3E()
 ;%0A    %7D%0A

Implement PTS actions