Text-Adventure/FoodObject.h
2023-11-16 00:44:12 +08:00

25 lines
553 B
C++

//
// Created by tqcq on 2023/11/14.
//
#ifndef TEXTADV_FOODOBJECT_H
#define TEXTADV_FOODOBJECT_H
#include "GameObject.h"
class FoodObject : public GameObject {
int energy;
public:
FoodObject();
FoodObject(const std::string &name, const std::string &keyword, const std::string &description, int energy);
std::string getInfo() const override;
int getEnergy() const;
void setEnergy(int energy);
std::string ToString() const override;
void FromString(const std::string &str) override;
};
#endif //TEXTADV_FOODOBJECT_H