add abstract player in expectance of draft players (#6210)

* add abstract player in expectance of draft players
This commit is contained in:
ebbit1q 2025-10-07 15:09:30 +02:00 committed by GitHub
parent c25b153185
commit 3cff55b0bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 1854 additions and 1707 deletions

View 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