-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanExit.cpp
26 lines (22 loc) · 1.02 KB
/
anExit.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include "anExit.h"
//------------------------------------------------------
// constructor
//------------------------------------------------------
anExit::anExit() { toRoom = -1; direction = ""; }
//------------------------------------------------------
// set methods
//------------------------------------------------------
void anExit::setDirection(string dir) { direction = dir; }
void anExit::setToRoom(int roomIndex) { toRoom = roomIndex; }
//------------------------------------------------------
// get methods
//------------------------------------------------------
string anExit::getDirection() { return direction; }
int anExit::getToRoom() { return toRoom; }
//------------------------------------------------------
// print
//------------------------------------------------------
void anExit::print() {
cout << "EXIT: toRoom = " << toRoom << " direction = " << direction << endl;
} // print()