Last change
on this file since edfd1d0 was edfd1d0, checked in by dportnoy <dmp1488@…>, 12 years ago |
Moved the Player class to the common directory, added a position to Player, added a new message type for sending player info, and made the server broadcast player positions everytime it receives and replies to a message
|
-
Property mode
set to
100644
|
File size:
421 bytes
|
Line | |
---|
1 | #ifndef _PLAYER_H
|
---|
2 | #define _PLAYER_H
|
---|
3 |
|
---|
4 | #include <netinet/in.h>
|
---|
5 | #include <string>
|
---|
6 |
|
---|
7 | #include "Common.h"
|
---|
8 |
|
---|
9 | using namespace std;
|
---|
10 |
|
---|
11 | class Player {
|
---|
12 | public:
|
---|
13 | Player(string name, string password);
|
---|
14 | Player(string name, sockaddr_in addr); // this will be deleted
|
---|
15 | ~Player();
|
---|
16 |
|
---|
17 | void setAddr(sockaddr_in addr);
|
---|
18 | void clearSensitiveInfo();
|
---|
19 |
|
---|
20 | string name;
|
---|
21 | string password;
|
---|
22 | sockaddr_in addr;
|
---|
23 | PLAYER_POS pos;
|
---|
24 | };
|
---|
25 |
|
---|
26 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.