-
Notifications
You must be signed in to change notification settings - Fork 0
/
LocationLamp.cpp
38 lines (34 loc) · 979 Bytes
/
LocationLamp.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
#include "Location.h"
#include "Flags.h"
#include <iostream>
class AllLocation10 : public Location
{
public:
AllLocation10()
{
addObject(new HumanDA) ;
}
virtual std::string getDescription() const
{
return "Âû îñòàíîâèëèñü ó ñêàìåéêè ïîä ñâåòîì ôîíàðÿ, ðÿäîì ñ òðîïèíêîé. "
"Íà ñåâåð âåä¸ò òðîïèíêà â ëåñ, íà çàïàä – ê ñòîëîâîé"
" è àäìèíèñòðàòèâíîìó êîðïóñó, íà âîñòîê – ê äîìèêó Âàøåãî îòðÿäà.";
}
virtual Location *getDirection(Direction dir) const
{
if (dir==DirNorth)
if (getStateFlag(FlagDA) == FVDABefore)
{
std::cout << "(Äìèòðèé Àëåêñàíäðîâè÷) Òóò Âàì, íå øóðû-ìóðû! Íó-êà áðûñü îòñþäîâà!\n" ;
return NULL;
}
else return locForest; // Òîïàåì â ëåñ, íàäî äîáàâèòü óñëîâèå ïîÿâëåíèÿ òðîïèíêè
if (dir==DirWest)
return locCrossroad_1; // òîïàåì ê ñòîëîâîé íà ðàçâèëêó 1.
if (dir==DirEast)
return locCrossroad_2; // èä¸ì íà ðàçâèëêó 2.
return NULL;
}
};
static AllLocation10 location;
Location *locLamp = &location;