source:
network-game/server/Player.cpp@
8e540f4
Last change on this file since 8e540f4 was 8e540f4, checked in by , 12 years ago | |
---|---|
|
|
File size: 444 bytes |
Rev | Line | |
---|---|---|
[8e540f4] | 1 | #include "Player.h" |
[2488852] | 2 | |
3 | #include <iostream> | |
4 | #include <arpa/inet.h> | |
5 | ||
6 | using namespace std; | |
7 | ||
[8e540f4] | 8 | Player::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] | 16 | Player::~Player() |
[2488852] | 17 | { |
18 | } | |
19 | ||
[73f75c1] | 20 | // was meant for the find find function. Currently unused |
[8e540f4] | 21 | bool 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.