Cockatrice 2026-06-27-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
arrow_data.h
Go to the documentation of this file.
1#ifndef COCKATRICE_ARROW_DATA_H
2#define COCKATRICE_ARROW_DATA_H
3
4#include <QColor>
5#include <QString>
6#include <libcockatrice/protocol/pb/serverinfo_arrow.pb.h>
8
10{
11 int creatorId = -1;
12 bool isLocalCreator = false;
13 int id = -1;
14 int startPlayerId = -1;
15 QString startZone = "";
16 int startCardId = -1;
18 QString targetZone = "";
19 int targetCardId = -1;
20 QColor color = "";
21
22 static ArrowData fromProto(const ServerInfo_Arrow &arrow, int creatorId, bool isLocalCreator);
23
24 bool isPlayerTargeted() const
25 {
26 return targetZone.isEmpty();
27 }
28};
29
30#endif // COCKATRICE_ARROW_DATA_H
Definition arrow_data.h:10
static ArrowData fromProto(const ServerInfo_Arrow &arrow, int creatorId, bool isLocalCreator)
Definition arrow_data.cpp:3
bool isPlayerTargeted() const
Definition arrow_data.h:24
QString targetZone
Definition arrow_data.h:18
int targetCardId
Definition arrow_data.h:19
int startCardId
Definition arrow_data.h:16
QString startZone
Definition arrow_data.h:15
QColor color
Definition arrow_data.h:20
int startPlayerId
Definition arrow_data.h:14
bool isLocalCreator
Definition arrow_data.h:12
int creatorId
Definition arrow_data.h:11
int targetPlayerId
Definition arrow_data.h:17