-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (34 loc) · 1.17 KB
/
Copy pathmain.cpp
File metadata and controls
41 lines (34 loc) · 1.17 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
#include <iostream>
#include "Map.h"
#include "ControllerClass.h"
#include "ViewClass.h"
#include "ModelClass.h"
#include "BlueMonster.h"
#include "OrangeMonster.h"
#include "memory"
#include <vector>
int main() {
Map map;
map.initMap();
sf::Texture texture;
texture.loadFromFile("C:/Users/danil/Downloads/sprites.png");
Player player(texture);
std::shared_ptr<Monster::Monster> Binky(new RedMonster(texture));
std::shared_ptr<Monster::Monster> Pinky(new PinkMonster(texture));
std::shared_ptr<Monster::Monster> Inky(new BlueMonster(texture));
std::shared_ptr<Monster::Monster> Clyde(new OrangeMonster(texture));
std::vector<std::shared_ptr<Monster::Monster>> monstersList;
monstersList.emplace_back(Binky);
monstersList.emplace_back(Pinky);
monstersList.emplace_back(Inky);
monstersList.emplace_back(Clyde);
ModelClass model;
model.setStartPlayerPositionOnMap(map, player);
for (const auto &monster: monstersList) {
model.setMonsterPositionOnMap(map, *monster);
}
ViewClass view;
ControllerClass controller;
view.showGame(controller, model, map, player, monstersList);
return EXIT_SUCCESS;
}