-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProjectCommand.cpp
More file actions
41 lines (30 loc) · 900 Bytes
/
Copy pathProjectCommand.cpp
File metadata and controls
41 lines (30 loc) · 900 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
#include "Company.h"
#include "Language.h"
#include "Platform.h"
#include "Project.h"
#include "ProjectCommand.h"
#include "MasterState.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using std::vector;
#include <map>
using std::map;
ProjectCommand::ProjectCommand(MasterState *masterState) : CommandFunctor(masterState, "project", "Start a project.") {
}
void ProjectCommand::executeCommand(const char *line) {
Language *language = this->languageChoiceMenu();
if (language == NULL)
return;
Platform *platform = this->platformChoiceMenu();
if (platform == NULL)
return;
Market *market = this->marketChoiceMenu();
if (market == NULL)
return;
Project *project = new Project(this->_masterState->getPlayerCompany(), language, platform, market);
this->_masterState->getPlayerCompany()->addProject(project);
}
ProjectCommand::~ProjectCommand() {
}