summaryrefslogtreecommitdiff
path: root/platypus/platypus.h
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-05-25 18:18:54 -0700
committerFuwn <[email protected]>2022-05-25 18:18:54 -0700
commiteef537e8c822e67f3407d5ac44ddfd6e6d4aac37 (patch)
tree77fab591bd5a67b1395a92a7b658232916f5f8a5 /platypus/platypus.h
parentformat(platypus): grammar (diff)
downloadwk7_platypusproject-eef537e8c822e67f3407d5ac44ddfd6e6d4aac37.tar.xz
wk7_platypusproject-eef537e8c822e67f3407d5ac44ddfd6e6d4aac37.zip
docs(platypus): add authors
Diffstat (limited to 'platypus/platypus.h')
-rw-r--r--platypus/platypus.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/platypus/platypus.h b/platypus/platypus.h
index 3e9ce2b..05cca77 100644
--- a/platypus/platypus.h
+++ b/platypus/platypus.h
@@ -29,9 +29,15 @@ private:
std::string gender;
public:
- /** A dead platypus */
+ /**
+ * @brief A dead platypus
+ * @author Ricky
+ */
Platypus(); // dead platypus
- /** A platypus with a custom state */
+ /**
+ * @brief A platypus with a custom state
+ * @authors Ricky and Zoltan
+ */
Platypus(float _weight, short _age, std::string _name, std::string _gender)
: weight(_weight), age(_age), alive(true), mutant(false),
name(std::move(_name)), gender(std::move(_gender)) {
@@ -41,7 +47,7 @@ public:
// establish
// ~Platypus() {}
- // Setters
+ // Setters, Ricky and Zoltan
/** Mutate the platypus' weight */
void setWeight(float _weight) { weight = _weight; }
/** Mutate the platypus' age */
@@ -55,7 +61,7 @@ public:
/** Mutate the platypus' mutant state */
void setMutant(bool _mutant) { this->mutant = _mutant; }
- // Getters
+ // Getters, Ricky and Zoltan
/** Get the platypus' weight */
float getWeight() const { return weight; }
/** Get the platypus' age */
@@ -69,9 +75,14 @@ public:
/** Get the platypus' mutant state */
bool getMutant() const { return this->mutant; }
+ // Ricky
+ /**
+ * @brief Print out a platypus
+ */
void print();
/**
* @brief Ages the platypus by one
+ * @author Zoltan
*
* The platypus has a 2% chance of becoming mutant.
*
@@ -81,6 +92,7 @@ public:
void ageMe();
/**
* @brief Fight another platypus
+ * @author Ricky
*
* The platypus has a ((platypus / aggressor) * 50) chance of death where the
* platypus survives if a random number between one and one-hundred resolves
@@ -91,11 +103,13 @@ public:
/**
* @brief Increases the weight of the platypus by the a random percent between
* 0.1 and 5.0 of the current weight.
+ * @author Zoltan
*
*/
void eat();
/**
* @brief Birth a new platypus with a random (alive, not mutant) state
+ * @author Zoltan
*
* If the current platypus is not alive, `hatch`ing will
* return an uninitialized platypus.