-
Notifications
You must be signed in to change notification settings - Fork 0
/
fighter.hpp
37 lines (25 loc) · 1.03 KB
/
fighter.hpp
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
#ifndef FIGHTER_HPP
#define FIGHTER_HPP
#include "vehicle.hpp"
using namespace std;
class fighter:public vehicle{
private:
weapon weapon1, weapon2;
int maxspeed;
public:
// -- Constructor and Destructor--
~fighter(){}
fighter(int dmaxspeed, int propulsiont, int pricet, weapon dweapon1, weapon dweapon2, owner *nowner, string n); /// parametrized constructor
// -- Modify functions --
void modifyms(int ms); /// modifies the maximum speed to the given one
void modifyweapon(int pos, weapon w); /// modifies the given weapon number type to the given one
// -- Auxiliary functions --
int ocapacity(); /// returns offensive capacity
int nweapons() { return 2; } /// returns number of weapons for iteration purposes
// -- Show functions --
void show(); /// prints the information of the fighter in the screen
void showweapon(int wn); /// prints the information of the given weapon number in the screen
// -- Formatting functions --
string reg(); /// returns a formatted string with the information of the fighter
};
#endif