summaryrefslogtreecommitdiff
path: root/quacker/macondo.h
diff options
context:
space:
mode:
Diffstat (limited to 'quacker/macondo.h')
-rw-r--r--quacker/macondo.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/quacker/macondo.h b/quacker/macondo.h
index de12fe1..f34117e 100644
--- a/quacker/macondo.h
+++ b/quacker/macondo.h
@@ -5,35 +5,39 @@
#include "game.h"
class QCheckBox;
-class QTimer;
-namespace Quackle {
- class Game;
- class MoveList;
-}
class MacondoBackend;
struct MacondoInitOptions;
class MoveBox;
class Macondo : public View {
Q_OBJECT
public:
- Macondo(Quackle::Game *, MoveBox *);
+ Macondo(Quackle::Game *game);
~Macondo();
- void setGame(Quackle::Game *);
// stop current analysis
void stop();
// should Macondo be used for simulations?
bool useForSimulation() const;
-signals:
- void newMoves(const Quackle::MoveList *);
+ inline const Quackle::MoveList &getMoves() const { return m_moves; }
+ inline bool hasMoves() const { return !m_moves.empty(); }
+ inline void clearMoves() { m_moves.clear(); }
+ // returns whether there have been any updates to moves since last time anyUpdates() was called.
+ inline bool anyUpdates() {
+ bool any = m_anyUpdates;
+ m_anyUpdates = false;
+ return any;
+ }
public slots:
void simulate();
+ virtual void gameChanged(Quackle::Game *game);
+private slots:
+ void gotSimMoves(const Quackle::MoveList &moves);
private:
QCheckBox *m_useMacondo;
Quackle::Game *m_game;
MacondoBackend *m_backend;
Quackle::MoveList m_moves;
int m_viewingPlyNumber = 0;
- MoveBox *m_moveBox;
+ bool m_anyUpdates = false;
std::unique_ptr<MacondoInitOptions> initOptions;
};