summaryrefslogtreecommitdiffstats
path: root/src/account.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/account.h')
-rw-r--r--src/account.h51
1 files changed, 24 insertions, 27 deletions
diff --git a/src/account.h b/src/account.h
index 564da11..cedc1bc 100644
--- a/src/account.h
+++ b/src/account.h
@@ -24,39 +24,36 @@
#ifndef ACCOUNT_H
#define ACCOUNT_H
-#include <iostream>
+#include <string>
+#include <vector>
#include "object.h"
#define ACC_MAX_CHARS 4
-//Account definition
+/**
+ * A player account.
+ */
class Account
{
- //Account name (username)
- std::string name;
- //Account password (MD5 hash)
- std::string password;
- //Account email adress
- std::string email;
-
- //Player data
- Being player[ACC_MAX_CHARS];
-
-
- public:
- Account() { };
- Account(const std::string &aName, const std::string aPassword,
- const std::string &email, Being aPlayer[ACC_MAX_CHARS]);
- ~Account();
-
- void setName(const std::string&);
- const std::string& getName();
-
- void setPassword(const std::string&);
- const std::string& getPassword();
-
- void setEmail(const std::string&);
- const std::string& getEmail();
+ public:
+ Account();
+ Account(const std::string &name, const std::string &password,
+ const std::string &email, const std::vector<Being*> &beings);
+ ~Account();
+
+ void setName(const std::string &name);
+ void setPassword(const std::string &password);
+ void setEmail(const std::string &email);
+
+ const std::string& getEmail();
+ const std::string& getPassword();
+ const std::string& getName();
+
+ private:
+ std::string name; /**< Username */
+ std::string password; /**< Password (md5 hash) */
+ std::string email; /**< Email address */
+ std::vector<Being*> beings; /**< Player data */
};
#endif