Skip to content
Snippets Groups Projects
Commit afd08392 authored by Ian Prins's avatar Ian Prins
Browse files

fix double angle bracket error

parent 7d94245f
No related branches found
No related tags found
No related merge requests found
......@@ -27,8 +27,8 @@ class Item : public Feature {
bool isThrowable();
void setIdentified(bool);
private:
static std::map<std::string, std::map<int, bool>> identified;
protected:
static std::map<std::string, std::map<int, bool> > identified;
bool canStack;
bool canThrow;
......@@ -39,4 +39,4 @@ class Item : public Feature {
int type;
};
std::map<std::string, std::map<int, bool>> Item::identified;
\ No newline at end of file
std::map<std::string, std::map<int, bool> > Item::identified;
......@@ -65,7 +65,7 @@ class Level {
static const int ROOM_PADDING = 2;
static const int MIN_ROOM_DIM = 3;
static const int X_SIZE = 80, Y_SIZE = 35;//80,25
std::vector<std::vector<Terrain>> tiles;
std::vector<std::vector<Terrain> > tiles;
std::vector<Room> rooms;
std::vector<ClockItem> mobs;
std::vector<GoldPile> golds;
......
......@@ -9,7 +9,7 @@
#include "level.h"
#include "mob.h"
using MONSTER_TUPLE_TYPE = std::tuple<int, int, std::vector<std::pair<int, int>>, int, const char*, int, std::pair<int, int>, std::string, std::pair<int, int>>;
using MONSTER_TUPLE_TYPE = std::tuple<int, int, std::vector<std::pair<int, int> >, int, const char*, int, std::pair<int, int>, std::string, std::pair<int, int> >;
//class Level;
......@@ -31,7 +31,7 @@ class Monster : public Mob {
enum Behaviour {AGGRESSIVE, FLYING, REGENERATIVE, GREEDY, INVISIBLE};
int carryChance;
std::vector<std::pair<int,int>> damage;
std::vector<std::pair<int,int> > damage;
std::vector<Behaviour> flags;
};
......@@ -79,4 +79,4 @@ std::map<char, MONSTER_TUPLE_TYPE> Monster::templateMap = {
{'Y', MONSTER_TUPLE_TYPE { 6, 30,{std::make_pair( 1, 6),
std::make_pair( 1, 6)}, 50, "", 4,std::make_pair( 4,8), "Yeti",std::make_pair(11,20)}},
{'Z', MONSTER_TUPLE_TYPE { 8, 0,{std::make_pair( 1, 8)}, 6, "A", 2,std::make_pair( 2,8), "Zombie",std::make_pair( 3,14)}}
};
\ No newline at end of file
};
......@@ -31,7 +31,7 @@ class PlayerChar : public Mob {
void equipRingRight(Ring*);
void equipWeapon(Weapon*);
int getGold();
std::vector<std::pair<Item*, int>> getInventory();
std::vector<std::pair<Item*, int> > getInventory();
int getStrength();
int getMaxStrength();
int getSightRadius();
......
......@@ -18,9 +18,9 @@ class Tunnel {
const double TUNNEL_CONFUSION = 0.1;
Tunnel::Direction flip(Tunnel::Direction);
Coord getDoorPlacement(Room*, Tunnel::Direction);
Coord findNextStep(Coord, std::vector<std::vector<double>>);
Coord findNextStep(Coord, std::vector<std::vector<double> >);
Coord posPlusDir(Coord, Tunnel::Direction);
Room* p;
Room* q;
Generator gen;
};
\ No newline at end of file
};
......@@ -99,10 +99,10 @@ int PlayerChar::getGold() {
return this->gold;
}
std::vector<std::pair<Item*, int>> PlayerChar::getInventory() {
std::map<std::string, std::pair<Item*, int>> itemMap;
std::vector<std::pair<Item*, int> > PlayerChar::getInventory() {
std::map<std::string, std::pair<Item*, int> > itemMap;
std::vector<Item*> contents = this->inventory.getContents();
std::vector<std::pair<Item*, int>> displayContents;
std::vector<std::pair<Item*, int> > displayContents;
for (auto itemIt = contents.begin() ; itemIt != contents.end() ; itemIt++) {
std::string itemName = (*itemIt)->getName();
......
......@@ -74,7 +74,7 @@ void Tunnel::dig(Level& level){
//Coord nextPos = start.copy();
Coord current = start.copy();
std::vector<std::vector<double>> map;
std::vector<std::vector<double> > map;
for (auto x=0; x < level.getSize()[0]; x++) {
map.push_back(std::vector<double>());
for (auto y=0; y < level.getSize()[1]; y++) {
......@@ -117,7 +117,7 @@ void Tunnel::dig(Level& level){
}
}
Coord Tunnel::findNextStep(Coord currPos, std::vector<std::vector<double>> map){
Coord Tunnel::findNextStep(Coord currPos, std::vector<std::vector<double> > map){
double currentScore = map[currPos[0]][currPos[1]];
Coord delta = Coord(0,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment