mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
beginning of pathfinding implementation
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#include "pathfinder.h"
|
||||
|
||||
namespace battleship{
|
||||
using namespace std;
|
||||
|
||||
static Pathfinder *pathfinder = nullptr;
|
||||
|
||||
Pathfinder* Pathfinder::getSingleton(){
|
||||
if(!pathfinder)
|
||||
pathfinder = new Pathfinder();
|
||||
|
||||
return pathfinder;
|
||||
}
|
||||
|
||||
Pathfinder::Pathfinder(){
|
||||
}
|
||||
|
||||
vector<int> Pathfinder::findPath(int **weights, int size, int source, int sink){
|
||||
int pathWeights[size];
|
||||
pathWeights[0] = 0;
|
||||
|
||||
for(int i = 1; i < size; i++)
|
||||
pathWeights[i] = -1;
|
||||
|
||||
vector<int> path;
|
||||
return path;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user