Class MapMud

java.lang.Object
  |
  +--os.OSProcess
        |
        +--MapMud

public class MapMud
extends OSProcess

A Bot OS program to map the rooms in the mud.

Version:
2.1
Author:
Thaddeus O. Cooper (cooper@tweenproject.org), Carsten Oertel

Constructor Summary
MapMud()
           
 
Method Summary
 boolean beVerbose()
           
 java.lang.String getDescription()
           
 boolean getExploreBreadthFirst()
           
 java.lang.String[] getFallbackExits()
           
 java.util.Properties getProperties()
           
 java.lang.String getRobotName()
           
 boolean getUseFallbackExits()
           
 boolean getUsePossibleExits()
           
 void initialize()
          This is called by the operating system during the initialization phase of the process.
 boolean isAllowedToExplore()
           
 Room lookHere()
           
 void run()
          The method that is called to do the real work of the process.
 void setAllowedToExplore(boolean t)
           
 void setDescription(java.lang.String description)
           
 void setExploreBreadthFirst(boolean exploreBreadthFirst)
           
 void setFallbackExits(java.lang.String[] fallbackExits)
           
 void setProperties(java.util.Properties properties)
           
 void setRobotName(java.lang.String name)
           
 void setUseFallbackExits(boolean useFallbackExits)
           
 void setUsePossibleExits(boolean usePossibleExits)
           
 void setVerbose(boolean t)
           
 boolean shouldExplore()
           
 void state10()
          We have been to this room before, so process any chatter that we have heard and then decide how to proceed next....
 void state11()
          We have not been to this room before, so add it to the database and continue processing...
 void state12()
          Pick an exit to try...
 void state13()
          All the exits in this room have been explored, so we need to decide how to proceed next...
 void state6()
          Look at the room the bot is in.
 void state8()
          This state determines if the room object was created, and if it was what to do next.
 void state9()
          This is where we check the current map to see if we already know about this room.
 
Methods inherited from class os.OSProcess
done, getArgs, getExitStatus, getId, getObject, getParentId, getShared, getWaitingFor, isInitialized, isWaitingFor, registerObject, requestObject, setArgs, setArgs, setExitStatus, setId, setInitialized, setObject, setParentId, setShared, setWaitingFor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapMud

public MapMud()
Method Detail

initialize

public void initialize()
Description copied from class: OSProcess
This is called by the operating system during the initialization phase of the process. By default this method sets the process to the initialized state and returns. More sophisticated processes should override this method and place their initialization code here. When initialization is complete, a call to setInitialized with a value of true will set the process to its initialized state.
Overrides:
initialize in class OSProcess

run

public void run()
         throws OSProcessRelinquishControl
Description copied from class: OSProcess
The method that is called to do the real work of the process. The process should not hold the CPU forever, or no other processes will be able to run.
Overrides:
run in class OSProcess
Tags copied from class: OSProcess
Throws:
OSProcessRelinquishControl - thrown when the process wants to temporarily relinquish control and let another process run.
OSProcessDone - thrown when the process is finished.
OSProcessLoadProcess - thrown when the process is requesting that the operating system load a process for it.
OSProcessExecProcess - thrown when the process is requesting that the operating system load a process and replace it with the new process. This process exits by default.
OSProcessWaitForProcess - thrown when the process wants to wait for another process to complete before continuing to run.

state6

public void state6()
Look at the room the bot is in. Then go to state six (6) to start processing it.

state8

public void state8()
This state determines if the room object was created, and if it was what to do next. If the bot started and stopped in the same place either the exit won't let the bot through, or looped back to the same place. Either way mark the exit bad and go to state ten (10). If the exit was good, then go to state nine (9).

state9

public void state9()
This is where we check the current map to see if we already know about this room.

state10

public void state10()
We have been to this room before, so process any chatter that we have heard and then decide how to proceed next....

state11

public void state11()
We have not been to this room before, so add it to the database and continue processing...

state12

public void state12()
Pick an exit to try...

state13

public void state13()
All the exits in this room have been explored, so we need to decide how to proceed next...

setRobotName

public void setRobotName(java.lang.String name)

getRobotName

public java.lang.String getRobotName()

setDescription

public void setDescription(java.lang.String description)

getDescription

public java.lang.String getDescription()

setExploreBreadthFirst

public void setExploreBreadthFirst(boolean exploreBreadthFirst)

getExploreBreadthFirst

public boolean getExploreBreadthFirst()

setUsePossibleExits

public void setUsePossibleExits(boolean usePossibleExits)

getUsePossibleExits

public boolean getUsePossibleExits()

setUseFallbackExits

public void setUseFallbackExits(boolean useFallbackExits)

getUseFallbackExits

public boolean getUseFallbackExits()

setFallbackExits

public void setFallbackExits(java.lang.String[] fallbackExits)

getFallbackExits

public java.lang.String[] getFallbackExits()

shouldExplore

public boolean shouldExplore()

setAllowedToExplore

public void setAllowedToExplore(boolean t)

isAllowedToExplore

public boolean isAllowedToExplore()

setVerbose

public void setVerbose(boolean t)

beVerbose

public boolean beVerbose()

setProperties

public void setProperties(java.util.Properties properties)

getProperties

public java.util.Properties getProperties()

lookHere

public Room lookHere()