Subversion Repositories QTron


Rev 19 | Rev 31 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef BIKE_H
#define BIKE_H

#include <QObject>
#include <QPainter>
#include <QTcpSocket>
#include <QLine>
#include <iostream>
#include <QHostAddress>
#include <QThread>
#include <cmath>

using namespace std;

class Bike : public QThread

    Bike(QTcpSocket *sock, int i);
    void draw(QPainter *painter,QList<Bike *> bikes);
    void run(QList<Bike *> bikes);
    bool hasCollided(QList<Bike *> bikes);
    void reset();
    bool isReady;
    bool dead;
    bool show;
    bool hadGo;
    float x;
    float y;
    QString name;
    int angle;
    QList<QPoint> linePoints;
    int id;
    bool isDisconnected;
    bool hasHadGo;
    QColor colour;
    bool collided;
    float abpool;

    QTcpSocket *socket;
    float velocity;

        private slots:
    void readyRead();
    void disconnected();

#endif // BIKE_H