From 8a4940fbeda79656b988ad51a22fa4d2fbba21e8 Mon Sep 17 00:00:00 2001
From: Alrik Appelfeldt <alrap417@student.liu.se>
Date: Wed, 6 Mar 2024 19:35:15 +0000
Subject: [PATCH] Upload New File

---
 Uppgift-3-Spel/ghost.h | 82 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)
 create mode 100644 Uppgift-3-Spel/ghost.h

diff --git a/Uppgift-3-Spel/ghost.h b/Uppgift-3-Spel/ghost.h
new file mode 100644
index 0000000..395958f
--- /dev/null
+++ b/Uppgift-3-Spel/ghost.h
@@ -0,0 +1,82 @@
+#ifndef GHOST_H
+#define GHOST_H
+
+
+
+
+#include "given.h"
+//#include "given.h"
+#include "string"
+using namespace std;
+class Ghost
+{
+public:
+Ghost(std::string const &color, Point const &start_pos);
+virtual void set_pos( Point &new_pos);
+virtual Point get_scatter(const Point &pos_pacman) = 0;
+virtual Point get_chase(const Point &pos_pacman, const Point &dir_pacman) = 0;
+virtual Point get_pos();
+virtual std::string get_color()const = 0;
+virtual ~Ghost() = default;
+
+
+
+public: 
+std::string color_index;
+Point pos; 
+
+};
+
+
+class Clyde: public Ghost
+
+{
+    public:
+Clyde(std::string const &color, Point const &start_pos);
+void set_pos(Point &new_pos);
+Point get_scatter(const Point &pos_pacman);
+Point get_chase(const Point &pos_pacman, const Point &dir_pacman);
+Point get_pos();
+std::string get_color()const;
+
+
+
+};
+
+
+
+class Pinky: public Ghost
+
+{
+    public:
+Pinky(std::string const &color, Point const &start_pos);
+void set_pos(Point &new_pos);
+Point get_scatter(const Point &pos_pacman);
+Point get_chase(const Point &pos_pacman, const Point &dir_pacman);
+Point get_pos();
+std::string get_color()const;
+
+
+
+};
+
+
+
+class Blinky : public Ghost
+{
+    public:
+bool get_angry();
+void set_angry(bool state);
+Blinky(std::string const &color, Point const &start_pos);
+void set_pos(Point &new_pos);
+Point get_scatter(const Point &pos_pacman);
+Point get_chase(const Point &pos_pacman, const Point &dir_pacman);
+Point get_pos();
+std::string get_color()const;
+
+private:
+bool angry = false ;
+
+
+};
+#endif
\ No newline at end of file
-- 
GitLab