Rev 23 | Rev 31 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | muzer | 1 | #ifndef BIKE_H |
2 | #define BIKE_H |
||
3 | |||
4 | #include <QObject> |
||
5 | #include <QPainter> |
||
6 | #include <QTcpSocket> |
||
7 | #include <QLine> |
||
8 | #include <iostream> |
||
9 | #include <QHostAddress> |
||
10 | #include <QThread> |
||
23 | muzer | 11 | #include <cmath> |
1 | muzer | 12 | |
13 | using namespace std; |
||
14 | |||
15 | class Bike : public QThread |
||
16 | { |
||
9 | muzer | 17 | Q_OBJECT |
1 | muzer | 18 | |
9 | muzer | 19 | public: |
20 | Bike(QTcpSocket *sock, int i); |
||
15 | muzer | 21 | void draw(QPainter *painter,QList<Bike *> bikes); |
9 | muzer | 22 | void run(QList<Bike *> bikes); |
15 | muzer | 23 | bool hasCollided(QList<Bike *> bikes); |
30 | tom | 24 | void setText(QString text); |
9 | muzer | 25 | void reset(); |
26 | bool isReady; |
||
27 | bool dead; |
||
28 | bool show; |
||
29 | bool hadGo; |
||
30 | float x; |
||
31 | float y; |
||
32 | QString name; |
||
33 | int angle; |
||
34 | QList<QPoint> linePoints; |
||
35 | int id; |
||
36 | bool isDisconnected; |
||
37 | bool hasHadGo; |
||
38 | QColor colour; |
||
39 | bool collided; |
||
19 | muzer | 40 | float abpool; |
1 | muzer | 41 | |
9 | muzer | 42 | private: |
43 | QTcpSocket *socket; |
||
44 | float velocity; |
||
1 | muzer | 45 | |
46 | private slots: |
||
9 | muzer | 47 | void readyRead(); |
48 | void disconnected(); |
||
1 | muzer | 49 | }; |
50 | |||
51 | #endif // BIKE_H |