Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
Loading...
Searching...
No Matches
server_move_card_struct.h
Go to the documentation of this file.
1
#ifndef MOVE_CARD_STRUCT
2
#define MOVE_CARD_STRUCT
3
4
#include "
server_card.h
"
5
class
CardToMove
;
6
7
struct
MoveCardStruct
8
{
9
Server_Card
*
card
;
10
int
position
;
11
const
CardToMove
*
cardToMove
;
12
int
xCoord
,
yCoord
;
13
MoveCardStruct
(
Server_Card
*_card,
int
_position,
const
CardToMove
*_cardToMove)
14
:
card
(_card),
position
(_position),
cardToMove
(_cardToMove),
xCoord
(_card->getX()),
yCoord
(_card->getY())
15
16
{
17
}
18
bool
operator<
(
const
MoveCardStruct
&other)
const
19
{
20
return
(
yCoord
== other.
yCoord
&&
21
((
xCoord
== other.
xCoord
&&
position
< other.
position
) ||
xCoord
< other.
xCoord
)) ||
22
yCoord
< other.
yCoord
;
23
}
24
};
25
26
#endif
Server_Card
Definition
server_card.h:39
server_card.h
CardToMove
Definition
command_move_card.proto:5
MoveCardStruct::xCoord
int xCoord
Definition
server_move_card_struct.h:12
MoveCardStruct::cardToMove
const CardToMove * cardToMove
Definition
server_move_card_struct.h:11
MoveCardStruct::position
int position
Definition
server_move_card_struct.h:10
MoveCardStruct::card
Server_Card * card
Definition
server_move_card_struct.h:9
MoveCardStruct::MoveCardStruct
MoveCardStruct(Server_Card *_card, int _position, const CardToMove *_cardToMove)
Definition
server_move_card_struct.h:13
MoveCardStruct::operator<
bool operator<(const MoveCardStruct &other) const
Definition
server_move_card_struct.h:18
MoveCardStruct::yCoord
int yCoord
Definition
server_move_card_struct.h:12
libcockatrice_network
libcockatrice
network
server
remote
game
server_move_card_struct.h
Generated by
1.18.0