-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplayer.h
More file actions
57 lines (51 loc) · 1.46 KB
/
player.h
File metadata and controls
57 lines (51 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef PLAYER_H
#define PLAYER_H
#include <string>
#include <set>
#include "item.h"
#include "room.h"
class Item;
class Room;
class Player {
private:
Room *room;
std::string username;
std::string password;
std::string description;
int playerID;
std::string lastLoginIp;
std::string lastLoginTime;
std::set<Item*> inventory;
bool canBuild;
bool canEdit;
public:
void save();
Player();
Player(std::string, std::string, int);
void setRoom(Room*);
Room* getRoom() const;
set<Item*> getInventory() const;
void addItemToInventory(Item*);
Item* findItemInInventory(std::string) const;
bool isItemInInventory(std::string);
void setCanBuild(bool);
bool getCanBuild() const;
void setCanEdit(bool);
bool getCanEdit() const;
void setUsername(std::string);
std::string getUsername() const;
void setLastLoginIp(std::string);
std::string getLastLoginIp() const;
void setLastLoginTime(std::string);
std::string getLastLoginTime() const;
void setPassword(std::string);
std::string getPassword() const;
void setDescription(std::string);
std::string getDescription() const;
void setID(int);
int getID() const;
std::set< Item*> dropItem(std::string);
//bool connected() const;
bool reqisPassed();
};
#endif