mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
boom
This commit is contained in:
parent
d329376e93
commit
1c2aa15b22
38 changed files with 638 additions and 1651 deletions
|
|
@ -1,66 +0,0 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Max-Wilhelm Bruker *
|
||||
* brukie@laptop *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#ifndef PLAYERZONE_H
|
||||
#define PLAYERZONE_H
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
class Card;
|
||||
class ServerSocket;
|
||||
class Player;
|
||||
|
||||
class PlayerZone {
|
||||
public:
|
||||
// PrivateZone: Contents of the zone are always visible to the owner,
|
||||
// but not to anyone else.
|
||||
// PublicZone: Contents of the zone are always visible to anyone.
|
||||
// HiddenZone: Contents of the zone are never visible to anyone.
|
||||
// However, the owner of the zone can issue a dump_zone command,
|
||||
// setting beingLookedAt to true.
|
||||
// Cards in a zone with the type HiddenZone are referenced by their
|
||||
// list index, whereas cards in any other zone are referenced by their ids.
|
||||
enum ZoneType { PrivateZone, PublicZone, HiddenZone };
|
||||
private:
|
||||
Player *player;
|
||||
QString name;
|
||||
bool has_coords;
|
||||
ZoneType type;
|
||||
int cardsBeingLookedAt;
|
||||
public:
|
||||
PlayerZone(Player *_player, const QString &_name, bool _has_coords, ZoneType _type);
|
||||
~PlayerZone();
|
||||
|
||||
Card *getCard(int id, bool remove, int *position = NULL);
|
||||
|
||||
int getCardsBeingLookedAt() const { return cardsBeingLookedAt; }
|
||||
void setCardsBeingLookedAt(int _cardsBeingLookedAt) { cardsBeingLookedAt = _cardsBeingLookedAt; }
|
||||
bool hasCoords() const { return has_coords; }
|
||||
ZoneType getType() const { return type; }
|
||||
QString getName() const { return name; }
|
||||
Player *getPlayer() const { return player; }
|
||||
|
||||
QList<Card *> cards;
|
||||
void insertCard(Card *card, int x, int y);
|
||||
void shuffle();
|
||||
void clear();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue