-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVortex.cpp
48 lines (38 loc) · 1.24 KB
/
Vortex.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**********************************************************************
Author: Shane
Purpose: Implementation of the Vortex class
Date: Monday March 12th 2018
***********************************************************************/
#include "Vortex.h"
#include "Board.h"
#include <iostream>
using std::cout;
using std::endl;
/**********************************************************************
CONSTRUCTOR AND DESTRUCTOR
***********************************************************************/
Vortex::Vortex() {
representation = 'E';
occupied = true; //don't allow anyone here
sType = vortex;
}
Vortex::~Vortex() {
//destructor does nothing for now
}
/**********************************************************************
OTHER MEMBER FUNCTIONS
***********************************************************************/
void Vortex::breakRock(Character* c) {
cout << "Error: Vortex can't be a broken rock." << endl;
}
bool Vortex::sendBacktoStart(Character *c) {
if(c->getCharacterType()==link)
{
cout << "You stepped into a vortex! you are now back at the start." << endl;
return true;
}
return false;
}
void Vortex::unlockDoor(Character* c) {
cout << "Error: rock can't be unlocked!" << endl;
}