Skip to content

Commit

Permalink
fix #5 Add details to in-world objects
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisWhisker committed Feb 6, 2023
1 parent 33345bc commit 98c0fc6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 11 additions & 1 deletion TextAdventure/GameObject.cpp
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
#include "GameObject.h"
#include "GameObject.h"

string GameObject::inspect()
{
return "It doesn't look particularly interesting.";
}

string GameObject::use()
{
return "Nothing happens.";
}
5 changes: 1 addition & 4 deletions TextAdventure/GameObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ class GameObject
{
public:
std::array<string, 3> names = { "name", "othername", "otherOtherName" };

string inspect();
void interact();

private:
string use(); // use it for its main purpose
};

0 comments on commit 98c0fc6

Please sign in to comment.