From 36d4f4741cd2559362de7e64820ca4b29b022121 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sat, 7 Jan 2023 23:24:04 -0500 Subject: Initial commit --- src/mob.hpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/mob.hpp (limited to 'src/mob.hpp') 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(); +}; -- cgit v1.2.3