Rev 6 | Rev 9 | 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> |
||
11 | |||
12 | using namespace std; |
||
13 | |||
14 | class Bike : public QThread |
||
15 | { |
||
16 | Q_OBJECT |
||
17 | |||
18 | public: |
||
19 | Bike(QTcpSocket *sock, int i); |
||
20 | void draw(QPainter *painter); |
||
8 | tom | 21 | void run(QList<Bike *> bikes); |
22 | bool hasCollided(); |
||
1 | muzer | 23 | void reset(); |
24 | bool isReady; |
||
25 | bool dead; |
||
26 | bool show; |
||
27 | bool hadGo; |
||
28 | float x; |
||
29 | float y; |
||
30 | QString name; |
||
31 | int angle; |
||
32 | QList<QPoint> linePoints; |
||
33 | int id; |
||
34 | bool isDisconnected; |
||
8 | tom | 35 | bool hasHadGo; |
36 | QColor colour; |
||
37 | bool collided; |
||
1 | muzer | 38 | |
39 | private: |
||
40 | QTcpSocket *socket; |
||
41 | float velocity; |
||
42 | |||
43 | private slots: |
||
44 | void readyRead(); |
||
45 | void disconnected(); |
||
46 | }; |
||
47 | |||
48 | #endif // BIKE_H |