-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.h
30 lines (27 loc) · 899 Bytes
/
Player.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
#pragma once // Specifica che il compilatore include il file di intestazione una sola volta, durante la compilazione di un file di codice sorgente
#include "Entity.h"
class Player : public Entity
{
protected:
int punti, vite;
int ammo;
public:
Player(int x, int y, char symbol = '@', int punti = 0, int vite = 0, int ammo = true);
void increaseX(int x);
void increaseY(int y);
void decreaseX(int x);
void decreaseY(int y);
int getPunti();
void setPunti(int pt);
int getVite();
void setVite(int vt);
int getAmmo(); // Restituisce la quantità di munizioni rimasta
void addAmmo(int n); // Aumenta la quantità di munizioni disponibili
void increasePunti(int pt);
void decreaseVite(int vt);
bool fire(); // Riduce la quantità di munizioni disponibili
int getPrevy();
int getPrevx();
void setPrevx(int x);
void setPrevy(int y);
};