TheCOSCGameProject  1.0
Public Member Functions | Public Attributes | List of all members
Room Class Reference

Represents a room in the dungeon. More...

#include <room.h>

Collaboration diagram for Room:
Collaboration graph
[legend]

Public Member Functions

 Room ()
 Constructor for the Room class. More...
 
void displayAvailableDirections ()
 Displays the available directions the player can move in. More...
 

Public Attributes

Roomnorth
 Pointer to the room to the north. More...
 
Roomsouth
 Pointer to the room to the south. More...
 
Roomwest
 Pointer to the room to the west. More...
 
Roomeast
 Pointer to the room to the east. More...
 
RoomContent roomContent
 The content of the room. More...
 

Detailed Description

Represents a room in the dungeon.

The Room class links rooms together and manages their contents, allowing the player to navigate between them.

Constructor & Destructor Documentation

◆ Room()

Room::Room ( )

Constructor for the Room class.

Initializes the room with default values and no connections to other rooms.

Initializes a Room object with null pointers for all directions and an empty RoomContent.

Member Function Documentation

◆ displayAvailableDirections()

void Room::displayAvailableDirections ( )

Displays the available directions the player can move in.

Display the available directions the player can move to.

Checks the neighboring rooms and lists the possible directions the player can move in.

Member Data Documentation

◆ east

Room* Room::east

Pointer to the room to the east.

◆ north

Room* Room::north

Pointer to the room to the north.

◆ roomContent

RoomContent Room::roomContent

The content of the room.

◆ south

Room* Room::south

Pointer to the room to the south.

◆ west

Room* Room::west

Pointer to the room to the west.


The documentation for this class was generated from the following files: