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

remove undefined behavior/uninitialized variables

parent 7c1f8418
No related branches found
No related tags found
No related merge requests found
......@@ -55,12 +55,9 @@ class PlayerChar : public Mob {
Ring* itemRingRight;
Weapon* itemWeapon;
int maxStr;
const int START_ARMOR = 1;
const int START_EXP = 0;
const int START_GOLD = 0;
const int START_HP = 12;
const int START_LEVEL = 1;
const int START_STR = 16;
static const int START_ARMOR = 1,
START_EXP = 0, START_GOLD = 0, START_HP = 12,
START_LEVEL = 1, START_STR = 16;
bool removeItem(Item*);
};
......@@ -4,8 +4,8 @@
#include "include/mob.h"
Mob::Mob(char symbol, Coord location)
: location(location),
symbol(symbol) {}
: Mob(symbol, location, name, 5, 0, 10, 1)
{}
Mob::Mob(char symbol, Coord location, std::string name, int armor, int exp, int mobHP, int level)
: armor(armor),
......
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