take care of other player

This commit is contained in:
2023-12-28 18:15:53 +01:00
parent 633592a4ea
commit 53a2a09399
3 changed files with 28 additions and 17 deletions

4
app.h
View File

@@ -32,6 +32,8 @@ protected:
typedef struct {
Vector2D coordinate;
int relativeDistanceToMe;
int relativeDistanceToOtherPlayer;
int pts;
} Gem;
@@ -43,9 +45,11 @@ protected:
QVector<Gem> gems_;
Vector2D myVehicle_;
QVector<Vector2D> otherVehicles_;
void addGem(int x, int y, int pts);
void fillField(QString body);
Vector2D computeRelativePts(Gem g);
void computeRelativeDistance(Gem* g);
void computeMove();
};