mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
reworked protocol; only server code for now
This commit is contained in:
parent
da6a1a0dbd
commit
a8c45fda1a
13 changed files with 669 additions and 534 deletions
|
|
@ -21,7 +21,7 @@
|
|||
#include "abstractrng.h"
|
||||
#include "card.h"
|
||||
|
||||
PlayerZone::PlayerZone(ServerSocket *_player, const QString &_name, bool _has_coords, ZoneType _type)
|
||||
PlayerZone::PlayerZone(Player *_player, const QString &_name, bool _has_coords, ZoneType _type)
|
||||
: player(_player), name(_name), has_coords(_has_coords), type(_type), cardsBeingLookedAt(0)
|
||||
{
|
||||
}
|
||||
|
|
@ -32,11 +32,11 @@ PlayerZone::~PlayerZone()
|
|||
clear();
|
||||
}
|
||||
|
||||
void PlayerZone::shuffle(AbstractRNG *rnd)
|
||||
void PlayerZone::shuffle()
|
||||
{
|
||||
QList<Card *> temp;
|
||||
for (int i = cards.size(); i; i--)
|
||||
temp.append(cards.takeAt(rnd->getNumber(0, i - 1)));
|
||||
temp.append(cards.takeAt(rng->getNumber(0, i - 1)));
|
||||
cards = temp;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue