diff options
author | Matt Kohls <mattkohls13@gmail.com> | 2019-01-14 00:48:11 -0500 |
---|---|---|
committer | Matt Kohls <mattkohls13@gmail.com> | 2019-01-14 00:48:11 -0500 |
commit | b184798e76a1306f7145a111cabf2d1754d2dd96 (patch) | |
tree | a4f2a714f7426a38e886002fd4ee02de5dbc6d28 /fungi.cpp | |
parent | 068d885e6ead3c8d550f3666443ea235b1b221f1 (diff) | |
download | fungi-b184798e76a1306f7145a111cabf2d1754d2dd96.tar.gz fungi-b184798e76a1306f7145a111cabf2d1754d2dd96.tar.bz2 fungi-b184798e76a1306f7145a111cabf2d1754d2dd96.zip |
Adding more comments and fixing some formatting
Diffstat (limited to 'fungi.cpp')
-rw-r--r-- | fungi.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -112,10 +112,22 @@ public: */ Color getColor() const { return color; } + /** + * Adds growth to the fungus + * @param val Amount to grow the fungus + */ void addGrowth(uint8_t val) { growthPoints += val; } + /** + * Gets the current growth of the fungus + * @return Current growth points of fungus + */ uint8_t getGrowthPoints() const { return growthPoints; } + /** + * Gets the current health of the fungus + * @return Current health points of the fungus + */ uint8_t getHP() const { return hp; } }; @@ -291,7 +303,7 @@ public: * Get list of living fungus * @return Vector of fungus in the dish */ - std::vector< Fungus* > & getPopulation() { return population; } + std::vector<Fungus*> & getPopulation() { return population; } }; /* |