forked from baharkholdisabeti/cc3k-villain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExceptions.h
51 lines (40 loc) · 1.27 KB
/
Exceptions.h
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
49
50
51
#ifndef _EXCEPTIONS_
#define _EXCEPTIONS_
#include <string>
//some exceptions we might want to throw.
//we also might want to make these different files
class Exceptions{
std::string message;
public:
Exceptions(std::string message );
std::string getMessage();
};
class BadCommand: public Exceptions{ // in case the player tries to move to a wall, or use a potion that doesn't exist or something
public:
BadCommand( std::string message );
};
class InvalidMove: public Exceptions{ // in case the player tries to move to a wall, or use a potion that doesn't exist or something
public:
InvalidMove( std::string message );
};
class WallMove: public Exceptions{ // in case the player tries to move to a wall, or use a potion that doesn't exist or something
public:
WallMove( std::string message );
};
class NoFile: public Exceptions{ //if the input file for the floor doesn't exist
public:
NoFile( std::string message );
};
class DragonStillAlive: public Exceptions{ //if you step on a dragon gold
public:
DragonStillAlive( std::string message );
};
class NoSpace: public Exceptions{
public:
NoSpace( std::string message );
};
class CantCollect: public Exceptions{
public:
CantCollect(std::string message);
};
#endif