From 894beccb28eba0815c20cb8706ea874a84c85c56 Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Mon, 19 Jun 2017 22:15:34 +0200 Subject: [PATCH] build: Added GameObject base to tictactoe sample * Gets used in gifs and video --- bin/app/user/projects/tictactoe/src/field.h | 4 +++- bin/app/user/projects/tictactoe/src/game_object.h | 10 ++++++++++ bin/app/user/projects/tictactoe/src/player.h | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 bin/app/user/projects/tictactoe/src/game_object.h diff --git a/bin/app/user/projects/tictactoe/src/field.h b/bin/app/user/projects/tictactoe/src/field.h index ef3201e8..c93ea640 100644 --- a/bin/app/user/projects/tictactoe/src/field.h +++ b/bin/app/user/projects/tictactoe/src/field.h @@ -1,7 +1,9 @@ #ifndef _FIELD_ #define _FIELD_ -class Field { +#include "game_object.h" + +class Field : public GameObject { public: enum Token { None = 0, diff --git a/bin/app/user/projects/tictactoe/src/game_object.h b/bin/app/user/projects/tictactoe/src/game_object.h new file mode 100644 index 00000000..fba0e6f3 --- /dev/null +++ b/bin/app/user/projects/tictactoe/src/game_object.h @@ -0,0 +1,10 @@ +#ifndef _GAME_OBJECT_ +#define _GAME_OBJECT_ + +class GameObject { +public: + GameObject() {} + virtual ~GameObject() {} +}; + +#endif // _GAME_OBJECT_ diff --git a/bin/app/user/projects/tictactoe/src/player.h b/bin/app/user/projects/tictactoe/src/player.h index 71a691a4..2124fc59 100644 --- a/bin/app/user/projects/tictactoe/src/player.h +++ b/bin/app/user/projects/tictactoe/src/player.h @@ -2,8 +2,9 @@ #define _PLAYER_ #include "field.h" +#include "game_object.h" -class Player { +class Player : public GameObject { public: Player( Field::Token token, const char* name ); virtual ~Player();