-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRocket.h
More file actions
40 lines (31 loc) · 666 Bytes
/
Rocket.h
File metadata and controls
40 lines (31 loc) · 666 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include <SFML/Graphics.hpp>
#include "Vector2d.h"
#include"DEFINITIONS.h"
#include "Game.h"
#include "DNA.h"
namespace CoreAidan {
class Rocket {
public:
Rocket(GameDataRef data);
Rocket(GameDataRef data, DNA newDNA);
~Rocket();
void applyForce(Vector2d force);
void update(Vector2d target);
void draw();
float calcFitness(Vector2d vector);
float distance(float x, float y);
bool isDone();
void completed(Vector2d target);
double fitness;
int count;
DNA dna;
private:
bool _completed = false;
GameDataRef _data;
Vector2d _target;
Vector2d _position;
Vector2d _velocity;
Vector2d _acceleration;
};
}