-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocation.cpp
More file actions
73 lines (60 loc) · 1.34 KB
/
Copy pathLocation.cpp
File metadata and controls
73 lines (60 loc) · 1.34 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/************************************************************
** Author: Peter Nguyen
** CS162-400, Final project
** Date: 6/6/15
** Description: Location abstract class implementation file
************************************************************/
#include "Location.hpp"
#include <string>
#include <iostream>
using std::string;
using std::cout;
/************************************************************
** Plains::printMenu
** Description: Prints the standard menu
** Parameters: none
************************************************************/
void Location::printMenu()
{
cout << "What do you want to do?\n";
cout << "0. (Reveal goal of the game)\n";
cout << "1. Move north\n";
cout << "2. Move south\n";
cout << "3. Move east\n";
cout << "4. Move west\n";
cout << "5. Recover strength (Fish required)\n";
}
/******* Set function definitions *******/
void Location::setNorth(Location* loc)
{
north = loc;
}
void Location::setSouth(Location* loc)
{
south = loc;
}
void Location::setEast(Location* loc)
{
east = loc;
}
void Location::setWest(Location* loc)
{
west = loc;
}
/******* Get function definitions *******/
Location* Location::getNorth()
{
return north;
}
Location* Location::getSouth()
{
return south;
}
Location* Location::getEast()
{
return east;
}
Location* Location::getWest()
{
return west;
}