-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRandomStrategy.h
29 lines (23 loc) · 1.12 KB
/
RandomStrategy.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
#include "Strategy.h"
#include "point.h"
#include "Creature.h"
#include "board.h"
#include "ghost.h"
class RandomStrategy : virtual public Strategy
{
private:
//-----------------------------------------Data Members----------------------------------------------//
unsigned int countSteps;
int amountSameDir; // The amount of steps in the same direction
public:
//-----------------------------------Public Member Functions-----------------------------------------//
RandomStrategy(int amount) : amountSameDir(amount), countSteps(0) {}
virtual void strategyMove(const Board& board, vector<Ghost>& ghosts, const Point& p_packman = { -1,-1 }) override;
//--------------------------------------Get Functions------------------------------------------------//
int getAmountSameDir() const { return amountSameDir; }
unsigned int getCountSteps() const { return countSteps; }
//--------------------------------------Set Functions-----------------------------------------------//
void setAmountSameDir(int amount) { amountSameDir = amount; }
void setCountSteps(int count) { countSteps = count; }
};