Last change
on this file since 8e540f4 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
|
Line | |
---|
1 | #include "Player.h"
|
---|
2 |
|
---|
3 | #include <iostream>
|
---|
4 | #include <arpa/inet.h>
|
---|
5 |
|
---|
6 | using namespace std;
|
---|
7 |
|
---|
8 | Player::Player(string name, sockaddr_in addr)
|
---|
9 | {
|
---|
10 | this->name = name;
|
---|
11 | this->addr = addr;
|
---|
12 |
|
---|
13 | cout << "Created new played: " << this->name << endl;
|
---|
14 | }
|
---|
15 |
|
---|
16 | Player::~Player()
|
---|
17 | {
|
---|
18 | }
|
---|
19 |
|
---|
20 | // was meant for the find find function. Currently unused
|
---|
21 | bool Player::operator == (const Player &p)
|
---|
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.