-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyTile.h
50 lines (40 loc) · 1.23 KB
/
myTile.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef MYTILE_H
#define MYTILE_H
#include "world.h"
#include <memory>
#include <iostream>
#include <stdexcept>
#include <string>
class myTile: public Tile
{
using Tile::Tile;
private:
int sCost; //Start Cost - This is the distance from the starting node
int hCost; //Heuristic Cost - This is the distance from the end node
int heapIndex;
static int tileID;
std::shared_ptr<myTile> parent;
public:
//myTile(int xPosition, int yPosition, float tileWeight) : Tile(xPosition, yPosition, tileWeight){}
myTile(int xPosition, int yPosition, float tileWeight);
myTile();
bool isWalkable();
int getTotalCost();
int getHeapIndex();
void setParent(std::shared_ptr<myTile> t);
void setHeapIndex(int x);
std::shared_ptr<myTile> getParent();
int compareTo(std::shared_ptr<myTile> tileToCompare);
int getSCost();
void setSCost(int newSCost);
void setHCost(int newHCost);
void incrementTileID();
int getTileID();
//private:
// int sCost; //Start Cost - This is the distance from the starting node
// int hCost; //Heuristic Cost - This is the distance from the end node
// int heapIndex;
// static int tileID;
// std::shared_ptr<myTile> parent;
};
#endif // MYTILE_H