diff options
author | Cara Salter <cara@devcara.com> | 2023-01-07 23:24:04 -0500 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2023-01-07 23:24:04 -0500 |
commit | 36d4f4741cd2559362de7e64820ca4b29b022121 (patch) | |
tree | 172537aa08f946e2a6dc65bc4bec40985f6e1f95 /src/mob.hpp | |
download | cpp-rl-master.tar.gz cpp-rl-master.zip |
Diffstat (limited to 'src/mob.hpp')
-rw-r--r-- | src/mob.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mob.hpp b/src/mob.hpp new file mode 100644 index 0000000..496a7bd --- /dev/null +++ b/src/mob.hpp @@ -0,0 +1,34 @@ +/* + * ===================================================================================== + * + * Filename: mob.hpp + * + * Description: Defines a mobile entity + * + * Version: 1.0 + * Created: 01/07/2023 09:54:14 PM + * Revision: none + * Compiler: gcc + * + * Author: Cara Salter (muirrum), cara@devcara.com + * Organization: + * + * ===================================================================================== + */ + +#pragma once +class Mob { + int _row, _col; + char _symbol; + public: + // Create a mob + Mob(char symbol, int row_0, int col_0); + // Change mob position + void move(int row_0, int col_0); + // Get character's row (y) position + int row(); + // Get mob's col (x) position + int col(); + // Get the symbol that represents this mob + char symbol(); +}; |