finished the bulk of game

This commit is contained in:
2024-07-14 21:32:41 -04:00
parent b3475b7530
commit af8bc4112c
110 changed files with 1876 additions and 1481 deletions

40
src/pc.cc Normal file
View File

@ -0,0 +1,40 @@
#include "pc.h"
#include "constants.h"
#include "player/goblin.h"
#include "player/drow.h"
#include "player/shade.h"
#include "player/troll.h"
#include "player/vampire.h"
void init_player(RNG *rng, std::unique_ptr<player_base> &pc,
const feature enabled_features, const enum race &r) {
using std::make_unique;
pc = nullptr;
switch (r) {
case rgoblin:
pc = make_unique<goblin>(rng, enabled_features);
break;
case rdrow:
pc = make_unique<drow>(rng, enabled_features);
break;
case rshade:
pc = make_unique<shade>(rng, enabled_features);
break;
case rtroll:
pc = make_unique<troll>(rng, enabled_features);
break;
case rvampire:
pc = make_unique<vampire>(rng, enabled_features);
break;
default:
break;
}
}