|
Last change
on this file since cbc595d was 41ad8ed, checked in by dportnoy <dmp1488@…>, 13 years ago |
|
The server properly handles registration messages
|
-
Property mode
set to
100644
|
|
File size:
512 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, string password)
|
|---|
| 9 | {
|
|---|
| 10 | this->name = name;
|
|---|
| 11 | this->password = password;
|
|---|
| 12 |
|
|---|
| 13 | cout << "Created new player: " << this->name << endl;
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | Player::Player(string name, sockaddr_in addr)
|
|---|
| 17 | {
|
|---|
| 18 | this->name = name;
|
|---|
| 19 | this->password = "";
|
|---|
| 20 | this->addr = addr;
|
|---|
| 21 |
|
|---|
| 22 | cout << "Created new played: " << this->name << endl;
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | Player::~Player()
|
|---|
| 26 | {
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | void Player::setAddr(sockaddr_in addr)
|
|---|
| 30 | {
|
|---|
| 31 | this->addr = addr;
|
|---|
| 32 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.