Crossfire Server, Trunk
CRECombatSimulator.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef CRECOMBATSIMULATOR_H
14 #define CRECOMBATSIMULATOR_H
15 
16 #include <QWidget>
17 #include <QDialog>
18 #include <QtWidgets>
19 
20 
21 #include "global.h"
22 
23 class QComboBox;
24 class QSpinBox;
25 class ArchetypeComboBox;
26 
27 class CRECombatSimulator : public QDialog
28 {
29  Q_OBJECT
30 
31  public:
33  virtual ~CRECombatSimulator();
34 
35  protected slots:
36  void fight();
37 
38  private:
39  void fight(const archetype* first, const archetype* second);
40 
43  QSpinBox* myCombats;
44  QSpinBox* myMaxRounds;
45  QLabel* myResultLabel;
46  QLabel* myResult;
47 
54 };
55 
56 #endif /* CRECOMBATSIMULATOR_H */
global.h
CRECombatSimulator::fight
void fight()
Definition: CRECombatSimulator.cpp:137
CRECombatSimulator::mySecondMaxHp
int mySecondMaxHp
Definition: CRECombatSimulator.h:53
CRECombatSimulator::myCombats
QSpinBox * myCombats
Definition: CRECombatSimulator.h:43
CRECombatSimulator::myFirstVictories
int myFirstVictories
Definition: CRECombatSimulator.h:48
archt
Definition: object.h:472
CRECombatSimulator::CRECombatSimulator
CRECombatSimulator()
Definition: CRECombatSimulator.cpp:22
CRECombatSimulator::myResultLabel
QLabel * myResultLabel
Definition: CRECombatSimulator.h:45
ArchetypeComboBox
Definition: ArchetypeComboBox.h:23
CRECombatSimulator::~CRECombatSimulator
virtual ~CRECombatSimulator()
Definition: CRECombatSimulator.cpp:63
CRECombatSimulator::myFirstMaxHp
int myFirstMaxHp
Definition: CRECombatSimulator.h:50
CRECombatSimulator::mySecond
ArchetypeComboBox * mySecond
Definition: CRECombatSimulator.h:42
CRECombatSimulator::myMaxRounds
QSpinBox * myMaxRounds
Definition: CRECombatSimulator.h:44
CRECombatSimulator::myFirstMinHp
int myFirstMinHp
Definition: CRECombatSimulator.h:49
CRECombatSimulator::myFirst
ArchetypeComboBox * myFirst
Definition: CRECombatSimulator.h:41
CRECombatSimulator::mySecondVictories
int mySecondVictories
Definition: CRECombatSimulator.h:51
CRECombatSimulator::myResult
QLabel * myResult
Definition: CRECombatSimulator.h:46
CRECombatSimulator::mySecondMinHp
int mySecondMinHp
Definition: CRECombatSimulator.h:52
CRECombatSimulator
Definition: CRECombatSimulator.h:27