source: network-game/common/Player.h@ edfd1d0

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
RevLine 
[2488852]1#ifndef _PLAYER_H
2#define _PLAYER_H
3
4#include <netinet/in.h>
5#include <string>
6
[edfd1d0]7#include "Common.h"
8
[2488852]9using namespace std;
10
[8e540f4]11class Player {
[2488852]12public:
[59061f6]13 Player(string name, string password);
14 Player(string name, sockaddr_in addr); // this will be deleted
[8e540f4]15 ~Player();
[2488852]16
[59061f6]17 void setAddr(sockaddr_in addr);
[edfd1d0]18 void clearSensitiveInfo();
[59061f6]19
[8e540f4]20 string name;
[59061f6]21 string password;
[8e540f4]22 sockaddr_in addr;
[edfd1d0]23 PLAYER_POS pos;
[2488852]24};
25
26#endif
Note: See TracBrowser for help on using the repository browser.