public WorldDynamic()
 {
     world = new WorldStatic();
     currentStateOfLocations = new Dictionary <LocationStatic, LocationDynamic>();
     agents = new Dictionary <AgentStateStatic, AgentStateDynamic>();
     //goalStates = new HashSet<Goal>();
     hasHashCode = false;
     hashCode    = 0;
 }
        public WorldDynamic(WorldDynamic clone)
        {
            world = (WorldStatic)clone.world.Clone();

            currentStateOfLocations = new Dictionary <LocationStatic, LocationDynamic>(
                clone.currentStateOfLocations.ToDictionary(entry => (LocationStatic)entry.Key.Clone(),
                                                           entry => (LocationDynamic)entry.Value.Clone()));

            agents = new Dictionary <AgentStateStatic, AgentStateDynamic>(clone.agents.ToDictionary(entry => (AgentStateStatic)entry.Key.Clone(),
                                                                                                    entry => (AgentStateDynamic)entry.Value.Clone()));

            hasHashCode = clone.hasHashCode;
            hashCode    = clone.hashCode;
        }
 public void SetStaticWorldPart(WorldStatic world)
 {
     this.world = (WorldStatic)world.Clone();
     UpdateHashCode();
 }