source: network-game/server/Player.cpp@ 36082e8

Last change on this file since 36082e8 was 8e540f4, checked in by dportnoy <dmp1488@…>, 12 years ago

Created a separate function for processing error messages, began capitalizing class names and class-related file names, and fixed the include guard in message,h

  • Property mode set to 100644
File size: 444 bytes
RevLine 
[8e540f4]1#include "Player.h"
[2488852]2
3#include <iostream>
4#include <arpa/inet.h>
5
6using namespace std;
7
[8e540f4]8Player::Player(string name, sockaddr_in addr)
[2488852]9{
10 this->name = name;
11 this->addr = addr;
12
13 cout << "Created new played: " << this->name << endl;
14}
15
[8e540f4]16Player::~Player()
[2488852]17{
18}
19
[73f75c1]20// was meant for the find find function. Currently unused
[8e540f4]21bool Player::operator == (const Player &p)
[2488852]22{
23 bool eq = addr.sin_addr.s_addr == p.addr.sin_addr.s_addr;
24
25 return eq;
26}
Note: See TracBrowser for help on using the repository browser.