sysModel.env
Class UnboundedEnv.LocalEnvironment

java.lang.Object
  extended by sysModel.env.AGlobalEnv.ALocalEnv
      extended by sysModel.env.ASquareEnv.ASquareLocalEnvironment
          extended by sysModel.env.UnboundedEnv.LocalEnvironment
Enclosing class:
UnboundedEnv

protected class UnboundedEnv.LocalEnvironment
extends ASquareEnv.ASquareLocalEnvironment

Concrete local environment for the square unbounded environment.


Nested Class Summary
protected  class UnboundedEnv.LocalEnvironment.MoveLambda
          Lambda to execute a move.
 
Field Summary
protected  ASquareEnv.Direction _dir
          Direction.
protected  ASquareEnv.Location _loc
          Location.
 
Fields inherited from class sysModel.env.AGlobalEnv.ALocalEnv
_state
 
Constructor Summary
UnboundedEnv.LocalEnvironment(ASquareEnv.Location loc, ASquareEnv.Direction dir)
          Construct a new local environment.
 
Method Summary
 ASquareEnv.Direction direction()
          Accessor for the direction.
 ASquareEnv.Location location()
          Accessor for the location.
protected  AGlobalEnv.ALocalEnv makeMoveFwdLocalEnv()
          Make local environment in forward direction.
protected  ILambda makeMoveLambda(AGlobalEnv.ALocalEnv le)
          Factory method for a move lambda.
 
Methods inherited from class sysModel.env.ASquareEnv.ASquareLocalEnvironment
drawFish, toString, turnRight
 
Methods inherited from class sysModel.env.AGlobalEnv.ALocalEnv
execute, removeFish, setState, tryBreedFwd, tryMoveFwd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_loc

protected ASquareEnv.Location _loc
Location.


_dir

protected ASquareEnv.Direction _dir
Direction.

Constructor Detail

UnboundedEnv.LocalEnvironment

public UnboundedEnv.LocalEnvironment(ASquareEnv.Location loc,
                                     ASquareEnv.Direction dir)
Construct a new local environment.

Parameters:
loc - location
dir - direction
Method Detail

location

public ASquareEnv.Location location()
Accessor for the location.

Specified by:
location in class ASquareEnv.ASquareLocalEnvironment
Returns:
location

direction

public ASquareEnv.Direction direction()
Accessor for the direction.

Specified by:
direction in class ASquareEnv.ASquareLocalEnvironment
Returns:
direction

makeMoveFwdLocalEnv

protected AGlobalEnv.ALocalEnv makeMoveFwdLocalEnv()
Make local environment in forward direction. Do not block yourself.

Specified by:
makeMoveFwdLocalEnv in class AGlobalEnv.ALocalEnv
Returns:
new local environment in forward direction

makeMoveLambda

protected ILambda makeMoveLambda(AGlobalEnv.ALocalEnv le)
Factory method for a move lambda.

Specified by:
makeMoveLambda in class AGlobalEnv.ALocalEnv
Parameters:
le - local environment for the target
Returns:
move lambda to execute the move to the target