-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMom.cpp
More file actions
54 lines (46 loc) · 1.46 KB
/
Copy pathMom.cpp
File metadata and controls
54 lines (46 loc) · 1.46 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
/*********************************************************************
** Program name: FinalProject
** Author: James Scanlon
** Date: March 19, 2019
** Description: Interface of the Mom class. Derived class of the Space class.
*********************************************************************/
#include "Mom.hpp"
#include "Player.hpp"
// constructor
Mom::Mom(Player* user) : Space("Mom's house", user)
{
vector<string> menuItems = {"Talk to your mom", "Leave"};
moveMenu->setPromptText("You're at your mom's house! What would you like to do?");
moveMenu->setMenuChoices(menuItems);
}
void Mom::enter(Player* user)
{
int userChoice = moveMenu->showMenu();
if (userChoice == 1)
{
switch (user->getObjective())
{
case 1:
cout << "Mom: Good luck with buying a poke ball!" << endl;
break;
case 2:
cout << "Mom: Shouldn't you be meeting Professor Oak?" << endl;
break;
case 3:
cout << "Mom: Good luck defeating Brock!" << endl;
break;
case 4:
cout << "Mom: Good luck defeating Misty!" << endl;
break;
case 5:
cout << "Mom: Wow! I'm so proud of you!" << endl;
user->setObjective(6);
break;
}
}
cout << "Your mom wishes you good luck!" << endl;
}
// destructor
Mom::~Mom()
{
}