Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <string>
- #include <cstdlib>
- #include <vector>
- enum Race {dwarf, elf, human, ork, gnome};
- enum Class {Monk, Paladin, Ranger, Mage, Fighter};
- class NPC {
- std::string name;
- int char_rating;
- Race race;
- Class clazz;
- int xp;
- int hp;
- // ...
- std::vector<double> vec;
- public:
- void update() {
- static int counter = 0;
- name = "npc " + std::to_string(counter++);
- char_rating = rand() % 100 + 1;
- race = Race(rand() % 5);
- clazz = Class(rand() % 5);
- int xp = rand() % 100;
- int hp = rand() % 101;
- /**/
- for(int i=0; i < 1000; ++i) {
- vec.push_back(i);
- }
- }
- std::string getName() {
- return name;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement