|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.person.ai.Mind
public class Mind
The Mind class represents a person's mind. It keeps track of missions and tasks which the person is involved.
Field Summary | |
---|---|
static java.lang.String |
JOB_EVENT
|
static java.lang.String |
MISSION_EVENT
|
Constructor Summary | |
---|---|
Mind(Person person)
Constructor |
Method Summary | |
---|---|
Job |
getJob()
Gets the person's job |
boolean |
getJobLock()
Checks if the person's job is locked and can't be changed. |
Mission |
getMission()
Returns the person's current mission. |
void |
getNewAction(boolean tasks,
boolean missions)
Determines a new action for the person based on available tasks, missions and active missions. |
Person |
getPerson()
Returns the person owning this mind. |
PersonalityType |
getPersonalityType()
Gets the person's personality type. |
SkillManager |
getSkillManager()
Returns a reference to the Person's skill manager |
TaskManager |
getTaskManager()
Returns the person's task manager |
boolean |
hasActiveMission()
Returns true if person has an active mission. |
void |
setInactive()
Set this mind as inactive. |
void |
setJob(Job newJob,
boolean locked)
Sets the person's job. |
void |
setMission(Mission newMission)
Sets the person's current mission. |
void |
takeAction(double time)
Take appropriate action for a given amount of time. |
void |
timePassing(double time)
Time passing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JOB_EVENT
public static final java.lang.String MISSION_EVENT
Constructor Detail |
---|
public Mind(Person person) throws java.lang.Exception
person
- the person owning this mind
java.lang.Exception
- if mind could not be created.Method Detail |
---|
public void timePassing(double time) throws java.lang.Exception
time
- the time passing (millisols)
java.lang.Exception
- if error.public void takeAction(double time) throws java.lang.Exception
time
- time in millisols
java.lang.Exception
- if error during action.public Person getPerson()
public TaskManager getTaskManager()
public Mission getMission()
public Job getJob()
public boolean getJobLock()
public void setJob(Job newJob, boolean locked)
newJob
- the new joblocked
- is the job locked so another can't be chosen?public boolean hasActiveMission()
public void setInactive()
public void setMission(Mission newMission)
newMission
- the new missionpublic void getNewAction(boolean tasks, boolean missions) throws java.lang.Exception
tasks
- can actions be tasks?missions
- can actions be new missions?
java.lang.Exception
- if new action cannot be found.public PersonalityType getPersonalityType()
public SkillManager getSkillManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |