package net.edralzar.wargolem;

import net.edralzar.wargolem.model.MapResource;
import net.edralzar.wargolem.model.Player;
import net.edralzar.wargolem.model.Role;
import net.edralzar.wargolem.model.WarRoom;

public class Golem {

    private WarRoom room;

    public Golem(WarRoom room) {
        if (room == null)
            throw new NullPointerException();
        this.room = room;
    }

    public void addPlayer(Player p) {
        room.getSquad().add(p);
        p.setRole(Role.SOLDIER);
    }

    public void setScout(Player p, MapResource mr) {
        room.getScouts().forcePut(mr, p);
        p.setRole(Role.SCOUT);
    }
}

@@ -574,32 +574,50 @@
 e mr) %7B%0D%0A       
+ Player oldScout =
  room.getScouts(
@@ -664,22 +664,164 @@
 le.SCOUT);%0D%0A
+        if (oldScout != null)%0D%0A            oldScout.setRole(Role.SOLDIER);%0D%0A    %7D%0D%0A%0D%0A    public WarRoom getWarRoom() %7B%0D%0A        return room;%0D%0A
     %7D%0D%0A%7D%0D%0A

reset role when replacing scout + getter on WarRoom