mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
add abstract player in expectance of draft players (#6210)
* add abstract player in expectance of draft players
This commit is contained in:
parent
c25b153185
commit
3cff55b0bb
11 changed files with 1854 additions and 1707 deletions
26
common/server/game/server_move_card_struct.h
Normal file
26
common/server/game/server_move_card_struct.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#ifndef MOVE_CARD_STRUCT
|
||||
#define MOVE_CARD_STRUCT
|
||||
|
||||
#include "server_card.h"
|
||||
class CardToMove;
|
||||
|
||||
struct MoveCardStruct
|
||||
{
|
||||
Server_Card *card;
|
||||
int position;
|
||||
const CardToMove *cardToMove;
|
||||
int xCoord, yCoord;
|
||||
MoveCardStruct(Server_Card *_card, int _position, const CardToMove *_cardToMove)
|
||||
: card(_card), position(_position), cardToMove(_cardToMove), xCoord(_card->getX()), yCoord(_card->getY())
|
||||
|
||||
{
|
||||
}
|
||||
bool operator<(const MoveCardStruct &other) const
|
||||
{
|
||||
return (yCoord == other.yCoord &&
|
||||
((xCoord == other.xCoord && position < other.position) || xCoord < other.xCoord)) ||
|
||||
yCoord < other.yCoord;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue