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

Adds starting headers (not checked if compiles)

parent 83005fff
No related branches found
No related tags found
No related merge requests found
class Coord {
public:
int& operator[](int);
Coord operator+(Coord, Coord);
Coord operator-(Coord, Coord);
private:
int x, int y;
}
#include "coord.h"
#include <string>
class Item {
public:
static const enum Location {OnGround, InPack};
static const enum Identified {Known, Unknown};
Coord getCoord();
std::string getName();
Location getLocation();
Identified isIdentified();
private:
Coord coord;
std::string name;
Location location;
Identified knowledge;
}
#include "item.h"
#include <vector>
class ItemZone {
public:
Item operator[](int);
bool remove(Item);
void add(Item);
private:
std::vector<Item> contents;
}
#include <string>
#include "coord.h"
#include "itemzone.h"
class PlayerChar {
public:
int getStrength();
int getArmor();
std::string getName();
int getGold();
int getHP();
int getMaxHP();
Coord getCoord();
int getLevel();
private:
int HP;
int maxHP;
int armor;
int strength;
int gold;
std::string name;
Coord coord;
ItemZone backpack;
int level;
}
#include <random>
class Generator {
public:
Generator();
int getNum(int, int);
private:
std::mt19937 gen;
}
class Terrain {
public:
static enum Passability {Blocked, Passable};
static enum Visibility {Blocked, Corridor, Transparent};
char getChar();
Passability isPassable();
Visibility getVisibility();
private:
char character;
Visibility visible;
Passability passable;
}
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