-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOak.cpp
More file actions
52 lines (44 loc) · 1.63 KB
/
Copy pathOak.cpp
File metadata and controls
52 lines (44 loc) · 1.63 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
/*********************************************************************
** Program name: FinalProject
** Author: James Scanlon
** Date: March 19, 2019
** Description: Interface of the Oak class. Derived class of the Space class.
*********************************************************************/
#include "Oak.hpp"
#include "Player.hpp"
// constructor
Oak::Oak(Player* user) : Space("Professor Oak's Lab", user)
{
vector<string> menuItems = {"Talk to Professor Oak", "Leave"};
moveMenu->setPromptText("You are in Professor Oak's Lab! What would you like to do?");
moveMenu->setMenuChoices(menuItems);
}
void Oak::enter(Player* user)
{
int userChoice = moveMenu->showMenu();
while (userChoice == 1)
{
switch (user->getObjective())
{
case 1:
cout << "Professor Oak: You need to go to the PokeStore and buy a poke ball so that I can give you your pokemon." << endl;
break;
case 2:
cout << "Professor Oak: Great! You have a poke ball! Here is your first pokemon! A Bulbasaur!" << endl;
user->setObjective(3);
break;
case 3:
cout << "Professor Oak: You must now go and defeat Brock! Be sure to train your pokemon." << endl;
break;
case 4:
cout << "Professor Oak: You must now go and defeat Misty! Be sure to train your pokemon." << endl;
break;
}
userChoice = moveMenu->showMenu();
}
cout << "Professor Oak bids you farewell!" << endl;
}
// destructor
Oak::~Oak()
{
}