MCPcopy Create free account
hub / github.com/ThePhD/sol2 / Player

Class Player

examples/source/property.cpp:7–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <iostream>
6
7class Player {
8public:
9 int get_hp() const {
10 return hp;
11 }
12
13 void set_hp(int value) {
14 hp = value;
15 }
16
17 int get_max_hp() const {
18 return maxhp;
19 }
20
21 void set_max_hp(int value) {
22 maxhp = value;
23 }
24
25private:
26 int hp = 50;
27 int maxhp = 50;
28};
29
30int main(int, char*[]) {
31

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected