the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 38 lines 772 B view raw
1#pragma once 2using namespace std; 3 4class Node 5{ 6 // 4J Jev, these classes were accessing protected members. 7 friend class BinaryHeap; 8 friend class PathFinder; 9 friend class EnderDragon; 10 11public: 12 const int x, y, z; 13 14private: 15 const int hash; 16 17protected: 18 int heapIdx; 19 float g, h, f; 20 Node *cameFrom; 21 22public: 23 bool closed; 24 25 void _init(); 26 eINSTANCEOF GetType() { return eType_NODE;} 27 28 Node() : hash(0),x(0),y(0),z(0) {} // 4J - added default constructor so we can make an empty of array of these as a copy target 29 Node(const int x, const int y, const int z); 30 31 static int createHash(const int x, const int y, const int z); 32 float distanceTo(Node *to); 33 float distanceToSqr(Node *to); 34 bool equals(Node *o); 35 int hashCode(); 36 bool inOpenSet(); 37 wstring toString(); 38};