Class Passage

All Implemented Interfaces:
Element

public class Passage extends Positionable
A way to a place. For instance, a door to a room, or a path to a forest.
Author:
José Paulo Leal jpleal@dc.fc.up.pt
Implementation Note:
corresponds to a Leaf in the Composite design pattern.
  • Constructor Details

    • Passage

      public Passage(Visual visual, String description, Place place)
      Create a passage to a place.
      Parameters:
      visual - showing the passage
      description - of the passage
      place - to which the passage leads
  • Method Details

    • getPlace

      public Place getPlace()
      The place to which this passage leads.
      Returns:
      the place to which this passage leads
    • accept

      public void accept(Visitor visitor)
      Accept a visitor.
      Parameters:
      visitor - the visitor to accept