Observes the SimList of the BrachistoSim simulation, adding or removing DisplayObjects to represent the simulation. BrachistoObserver also listens for the PATH_CHOSEN event from BrachistoSim and modifies the DisplayText message accordingly, to show the 'click a path' message or the 'you chose' message.

Note that this will add DisplayObject for every object currently on the simList.

Implements

Constructors

Methods

  • Notifies this Observer that a change has occurred in the Subject.

    Parameters

    • event: SubjectEvent

      contains information about what has changed in the Subject: typically either a one-time GenericEvent, or a change to the value of a Parameter

    Returns void

  • Returns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.

    For an object whose main purpose is to represent another Printable object, it is recommended to include the result of calling toStringShort on that other object. For example, calling toStringShort() on a DisplayShape might return something like this:

    DisplayShape{polygon:Polygon{'chain3'}}
    

    Returns string

    a minimal string representation of this object.

Generated using TypeDoc