public void Behave(World state) { var worldView = new WorldView(state, location); behaviour = behaviour.Invoke(actor, worldView); location = worldView.Location; }
public Tuple<Activity, Behaviour> Then(Behaviour next) { return Tuple.Create(this, next); }
public ActorWithLocationAndBehaviour(Actor actor, Location location, Behaviour behaviour) { this.actor = actor; this.location = location; this.behaviour = behaviour; }