public AgentStateDynamic(AgentStateDynamic clone) { agentInfo = (AgentStateStatic)clone.agentInfo.Clone(); myCurrentPlan = (Plan)clone.myCurrentPlan.Clone(); myAvailableActions = new List <PlanAction>(clone.myAvailableActions); alive = clone.alive; myGoals = (Goal)clone.myGoals.Clone(); beliefs = (WorldContext)clone.beliefs.Clone(); initiative = clone.initiative; angryAt = (AgentAngryAt)clone.angryAt.Clone(); scared = clone.scared; foundEvidence = (AgentFoundEvidence)clone.foundEvidence.Clone(); if (clone.wantsToGo != null) { wantsToGo = (LocationStatic)clone.wantsToGo.Clone();; } else { wantsToGo = new LocationStatic(); } exploredRooms = new HashSet <LocationStatic>(clone.exploredRooms); wantToEntrap = (WantToEntrap)clone.wantToEntrap.Clone(); talkingWith = (TalkingWith)clone.talkingWith.Clone(); hasHashCode = clone.hasHashCode; hashCode = clone.hashCode; skipedTurns = clone.skipedTurns; timeToMove = clone.timeToMove; }
/// <summary> /// Parameterless constructor. /// </summary> public AgentStateDynamic() { agentInfo = new AgentStateStatic(); myCurrentPlan = new Plan(); myAvailableActions = new List <PlanAction>(); alive = true; myGoals = new Goal(); beliefs = new WorldContext(); initiative = 0; angryAt = new AgentAngryAt(); scared = false; foundEvidence = new AgentFoundEvidence(); wantsToGo = new LocationStatic(); exploredRooms = new HashSet <LocationStatic>(); wantToEntrap = new WantToEntrap(); talkingWith = new TalkingWith(); hasHashCode = false; hashCode = 0; skipedTurns = 0; timeToMove = 2; }
/// <summary> /// Constructor with parameters. /// </summary> public AgentStateDynamic(bool alive, Goal goals, WorldContext beliefs, AgentStateStatic agentInfo) { this.agentInfo = agentInfo; myCurrentPlan = new Plan(); myAvailableActions = new List <PlanAction>(); SetStatus(alive); SetGoal(goals); SetBeliefs(beliefs); SetInitiative(0); AgentAngryAt angryAt = new AgentAngryAt(false, null); SetObjectOfAngry(angryAt); ScaredOff(); AgentFoundEvidence foundEvidence = new AgentFoundEvidence(false, null); AddEvidence(foundEvidence); WantToEntrap wantToEntrap = new WantToEntrap(false, null, null); SetEntrap(wantToEntrap); TalkingWith talkingWith = new TalkingWith(false, null); SetTalking(talkingWith); SetTargetLocation(null); exploredRooms = new HashSet <LocationStatic>(); hasHashCode = false; hashCode = 0; skipedTurns = 0; timeToMove = 2; }
public void AddEvidence(AgentFoundEvidence foundEvidence) { this.foundEvidence = foundEvidence; UpdateHashCode(); }