Skip to content
Snippets Groups Projects
Commit 644d5911 authored by Adrian Smaka's avatar Adrian Smaka
Browse files

Adrian push

parent f4fb010f
Branches
No related tags found
No related merge requests found
#include "ghost.h"
Ghost::Ghost(const string &colorName, Point const &start_position)
: color_index(colorName), pos(start_position)
{}
void Ghost::set_pos( Point &new_pos) {
pos = new_pos;
}
Point Ghost::get_pos() {
return pos;
}
bool Blinky::get_angry(){
return angry;
}
void Blinky::set_angry(bool state) {
angry = state;
}
Blinky::Blinky(std::string const &color, Point const &start_pos)
: Ghost("red", start_pos)
{}
void Blinky::set_pos(Point &new_pos) {
set_pos(new_pos);
}
Point Blinky::get_scatter(const Point &pos_pacman) {
if (angry == true)
{
return Point{pos_pacman.x, pos_pacman.y}; // stämmer?
} else
{
return Point{6, 6};
}
}
Point Blinky::get_chase(const Point &pos_pacman, const Point &dir_pacman) {
return Point{pos_pacman.x, pos_pacman.y};
}
Point Blinky::get_pos() {
return pos;
}
std::string Blinky::get_color() {
return "pink";
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment