summaryrefslogtreecommitdiffstats
path: root/examples/statemachine/errorstateplugins/random_ai
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-04-30 07:43:13 (GMT)
committerEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-04-30 07:43:13 (GMT)
commit0d33e6e464c324d1b43b08ce7ac0dcd4c216d17e (patch)
tree3e56d4d54a996ee5264c009d9976b2731bbef509 /examples/statemachine/errorstateplugins/random_ai
parent0f8de3b0b4ccccbeba97999635eb5716f561fb30 (diff)
downloadQt-0d33e6e464c324d1b43b08ce7ac0dcd4c216d17e.zip
Qt-0d33e6e464c324d1b43b08ce7ac0dcd4c216d17e.tar.gz
Qt-0d33e6e464c324d1b43b08ce7ac0dcd4c216d17e.tar.bz2
Make design better. Remove the Tank interface. This is now an implicit interface
based on the meta-object system.
Diffstat (limited to 'examples/statemachine/errorstateplugins/random_ai')
-rw-r--r--examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.cpp4
-rw-r--r--examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.cpp b/examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.cpp
index 135c7b6..c196247 100644
--- a/examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.cpp
+++ b/examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.cpp
@@ -1,13 +1,11 @@
#include "random_ai_plugin.h"
-#include <errorstate/tank.h>
-
#include <QState>
#include <QtPlugin>
#include <time.h>
-QState *RandomAiPlugin::create(QState *parentState, Tank *tank)
+QState *RandomAiPlugin::create(QState *parentState, QObject *tank)
{
qsrand(uint(time(NULL)));
diff --git a/examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.h b/examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.h
index 758b3e8..d3670bd 100644
--- a/examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.h
+++ b/examples/statemachine/errorstateplugins/random_ai/random_ai_plugin.h
@@ -56,7 +56,7 @@ class RandomAiPlugin: public QObject, public Plugin
Q_OBJECT
Q_INTERFACES(Plugin)
public:
- virtual QState *create(QState *parentState, Tank *tank);
+ virtual QState *create(QState *parentState, QObject *tank);
};
#endif // RANDOM_AI_PLUGIN_H