-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtravelstate.h
More file actions
45 lines (36 loc) · 887 Bytes
/
travelstate.h
File metadata and controls
45 lines (36 loc) · 887 Bytes
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
#ifndef TRAVELSTATE_H
#define TRAVELSTATE_H
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <list>
#include <map>
#include "gamestate.h"
#include "idlestate.h"
//#include "world.h"
class World;
#include "worldlocation.h"
#include "roadlocation.h"
class TravelState : public GameState {
private:
// Current direction of travel
std::string direction;
WorldLocation* loc;
int dir;
// Denotes if there is a fork
bool hasCrossroad = false;
// The direction of the crossroad
std::string newDirection = "";
// Choice constants
enum Choices{
SIT_OPTION = '1',
CONTINUE_OPTION = '2',
FORK_OPTION = '3'
};
public:
TravelState(WorldLocation*, int);
~TravelState();
void printOptions() override;
void handleInput(int, std::stack<GameState*>&, Player&, World&) override;
};
#endif