Area

class Area(var name: String, var description: String)

The class Area represents locations in a text adventure game world. A game world consists of areas. In general, an “area” can be pretty much anything: a room, a building, an acre of forest, or something completely different. What different areas have in common is that players can be located in them and that areas can have exits leading to other, neighboring areas. An area also has a name and a description.

NOTE: The AdventureDraft module is not even close to being well designed. See Chapter 9.3 in the course materials.

Value parameters:
description

a description of the area

name

the name of the area

class Object
trait Matchable
class Any

Value members

Concrete methods

override def toString: String

Returns a description of the area for debugging purposes.

Returns a description of the area for debugging purposes.

Definition Classes

Concrete fields

the area that is reached by exiting due east from this area; None if there is no eastwardly exit

the area that is reached by exiting due east from this area; None if there is no eastwardly exit

the area that is reached by exiting due north from this area; None if there is no northwardly exit

the area that is reached by exiting due north from this area; None if there is no northwardly exit

the area that is reached by exiting due south from this area; None if there is no southwardly exit

the area that is reached by exiting due south from this area; None if there is no southwardly exit

the area that is reached by exiting due west from this area; None if there is no westwardly exit

the area that is reached by exiting due west from this area; None if there is no westwardly exit