AdventureDraft Docs
Fall 2026
API

# Area

o1.adventure.draft.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.

## Parameters

description

  a description of the area

name

  the name of the area

## Attributes

Graph
Supertypes
  class Object
  trait Matchable
  class Any

## Members list

### 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.

## Attributes

Definition Classes
  Any

#### Concrete fields

var description: String
var eastNeighbor: Option[Area]

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

## Attributes

var name: String
var northNeighbor: Option[Area]

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

## Attributes

var southNeighbor: Option[Area]

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

## Attributes

var westNeighbor: Option[Area]

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

## Attributes