From 4618763c0e3a723bf4bb43c7b9edbce87240e0af Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 16 Apr 2021 11:23:27 -0400 Subject: Rebased feature/item on entry --- src/entry.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/entry.cc (limited to 'src/entry.cc') diff --git a/src/entry.cc b/src/entry.cc new file mode 100644 index 0000000..b6431f0 --- /dev/null +++ b/src/entry.cc @@ -0,0 +1,15 @@ +#include "entry.h" + +namespace creature { + class Creature; +} + +namespace entry { + std::string genText(const Entry& e, const creature::Creature& c) { + return e.getName() + " (" + e.getType() + ")"; + } + + std::string Entry::getText(const creature::Creature& c) const { + return genText(*this, c); + } +} -- cgit v1.2.3