We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 195ec42 commit 92bebf1Copy full SHA for 92bebf1
1 file changed
A_Star_Search/Lua/Yonaba/node.lua
@@ -1,11 +1,17 @@
1
-- A* Node class abstraction
2
3
+-- This class represents an abstraction of the A* Node.
4
+-- It should implemented with additional functions when
5
+-- writing a custom handler.
6
+
7
+-- See astar.lua comment header.
8
+-- See custom handlers for reference (*_hander.lua).
9
10
local class = require 'class'
11
12
local Node = class {g = 0, h = 0, f = 0}
-local Node_mt = getmetatable(Node)
-Node_mt.__eq = function(a, b) return a:isEqualTo(b) end
-Node_mt.__lt = function(a, b) return a.f < b.f end
-Node_mt.__tostring = function(n) return n:toString() end
13
+Node.__eq = function(a, b) return a:isEqualTo(b) end
14
+Node.__lt = function(a, b) return a.f < b.f end
15
+Node.__tostring = function(n) return n:toString() end
16
-return Node
17
+return Node
0 commit comments