wworld
Class ActorState

java.lang.Object
  |
  +--wworld.ActorState

public class ActorState
extends java.lang.Object

An Actor is either an agent or a wumpus. They have different states which are described by the ActorState class.


Field Summary
static int ALIVE
          Describes the state of the actor when the actor is alive in the world.
static int DEAD
          Describes the state of the actor when the actor is dead in the world.
static int VICTORIOUS
          Describes the state of the agent when the agent has climbed out of the cave alive.
 
Constructor Summary
ActorState(int a)
          Constructor for ActorState with setting of initial state of the Actor
 
Method Summary
 int getActorState()
          Returns the State of the Actor.
 void setActorState(int a)
          Returns the State of the Actor.
 java.lang.String toString()
          Returns the state of the actor as a string alive, dead or victorious
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIVE

public static final int ALIVE
Describes the state of the actor when the actor is alive in the world.

See Also:
Constant Field Values

DEAD

public static final int DEAD
Describes the state of the actor when the actor is dead in the world.

See Also:
Constant Field Values

VICTORIOUS

public static final int VICTORIOUS
Describes the state of the agent when the agent has climbed out of the cave alive.

See Also:
Constant Field Values
Constructor Detail

ActorState

public ActorState(int a)
Constructor for ActorState with setting of initial state of the Actor

Method Detail

getActorState

public int getActorState()
Returns the State of the Actor.

Returns:
State of the actor.

setActorState

public void setActorState(int a)
Returns the State of the Actor.


toString

public java.lang.String toString()
Returns the state of the actor as a string alive, dead or victorious

Overrides:
toString in class java.lang.Object
Returns:
alive, dead or victorious