mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-28 06:02:56 +08:00
16 lines
565 B
C++
16 lines
565 B
C++
class QBomb : public QFsm {
|
|
uint8_t m_timeout; // number of seconds till explosion
|
|
uint8_t m_defuse; // the secret defuse code
|
|
uint8_t m_code; // the current defuse code entry
|
|
|
|
public:
|
|
QBomb() : QFsm((QStateHandler)&QBomb::initial) {
|
|
}
|
|
|
|
protected:
|
|
static QState initial(QBomb *me, QEvent const *e);
|
|
static QState setting(QBomb *me, QEvent const *e);
|
|
static QState timing(QBomb *me, QEvent const *e);
|
|
static QState blast(QBomb *me, QEvent const *e);
|
|
};
|