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
tally.h
Go to the documentation of this file.
1
#ifndef COCKATRICE_TALLY_H
2
#define COCKATRICE_TALLY_H
3
#include <QList>
4
#include <QString>
5
6
class
CardItem
;
7
9
struct
TallyRow
10
{
11
QString
name
;
12
QString
value
;
13
14
bool
operator==
(
const
TallyRow
&)
const
=
default
;
15
};
16
20
enum class
TallyType
21
{
22
None
,
23
Subtypes
,
24
TotalPower
,
25
TotalToughness
,
26
MaxValue
=
TotalToughness
// sentinel value
27
};
28
29
namespace
Tally
30
{
31
38
TallyType
intToType
(
int
value);
39
48
QList<TallyRow>
compute
(
const
QList<CardItem *>
&cards,
TallyType
type
);
49
50
}
// namespace Tally
51
52
#endif
// COCKATRICE_TALLY_H
CardItem
Definition
card_item.h:33
QList
Definition
remote_connection_controller.h:20
Tally
Definition
tally.h:30
Tally::intToType
TallyType intToType(int value)
Definition
tally.cpp:6
Tally::compute
QList< TallyRow > compute(const QList< CardItem * > &cards, TallyType type)
Analyzes the selected cards according to the tally type and builds the resulting tally rows....
Definition
tally.cpp:15
type
EmailType type
Definition
smtpclient.cpp:30
TallyRow
A single row of the tally output.
Definition
tally.h:10
TallyRow::value
QString value
Value for the row (displayed on the right).
Definition
tally.h:12
TallyRow::name
QString name
The row name (displayed on the left).
Definition
tally.h:11
TallyRow::operator==
bool operator==(const TallyRow &) const =default
TallyType
TallyType
Definition
tally.h:21
TallyType::None
@ None
Definition
tally.h:22
TallyType::TotalToughness
@ TotalToughness
Definition
tally.h:25
TallyType::MaxValue
@ MaxValue
Definition
tally.h:26
TallyType::TotalPower
@ TotalPower
Definition
tally.h:24
TallyType::Subtypes
@ Subtypes
Definition
tally.h:23
cockatrice
src
game_graphics
tally
tally.h
Generated by
1.18.0