-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogicServer.h
More file actions
35 lines (32 loc) · 1 KB
/
LogicServer.h
File metadata and controls
35 lines (32 loc) · 1 KB
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
30
31
32
33
34
35
/**
* Authors: Alysha Aul, Nandhitha Krishnan, Paul Rodgers, Nouran Sakr, Chun Yang
* Date: November 7, 2023
* Purpose: To act as a communication link between the Algorithm and Interface classes.
*/
#ifndef LOGICSERVER_H
#define LOGICSERVER_H
#include "AlgorithmFactory.h"
#include "Block.h"
#include <vector>
/**
* Class to handle calls between the algorithm class and interface.
*/
class LogicServer
{
public:
/**
* The constructor calls the pathfinding algorithm based on the chosen algorithm.
*/
LogicServer(Board* board) {
AlgorithmFactory* factory;
type = 0;
algorithmInstance_ = factory->createAlgorithmInstance(type, board);
}
void setAlgorithm(int algorithmType, Board* board);
int getAlgorithmType();
std::pair<std::vector<std::pair<int, int>>, std::vector<std::pair<int, int>>> runAlgorithm();
private:
int type;
Algorithm *algorithmInstance_;
};
#endif