-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlander.h
61 lines (51 loc) · 1.3 KB
/
lander.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/***********************************************************************
* Header File:
* Point : The representation of a position on the screen
* Author:
* Ankita Dev
* Summary:
* Everything we need to know about a location on the screen, including
* the location and the bounds of the frame.
************************************************************************/
#ifndef LANDER_H
#define LANDER_H
#include <iostream>
#include "point.h"
#include "velocity.h"
class Lander
{
private:
Point point;
Velocity velocity;
bool landed;
bool alive;
int fuel;
float gravity;
public:
/********************
* Constructors
********************/
Lander();
/********************
* Getters
********************/
Point getPoint()const {return point;}
Velocity getVelocity() const {return velocity;}
int getFuel() {return fuel;};
bool isAlive(){return alive;};
bool isLanded(){return landed;};
bool canThrust(){return gravity;};
/********************
* Setters
********************/
void setLanded(bool landed);
void setAlive(bool alive);
void setFuel(int fuel);
void applyGravity(float gravity);
void applyThrustLeft();
void applyThrustRight();
void applyThrustBottom();
void advance();
void draw();
};
#endif