Advertisement
Ozzypig

GraphEdge

Feb 26th, 2018
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. -- GraphEdge class
  2. -- ModuleScript inside Graph ModuleScript
  3. -- by Ozzypig (Twitter: @Ozzypig, ozzypig.com)
  4.  
  5. local GraphEdge = {}
  6. GraphEdge.__index = GraphEdge
  7.  
  8. function GraphEdge.new(nodeOrigin, nodeTarget, value)
  9.     local self = setmetatable({
  10.         origin = nodeOrigin;
  11.         target = nodeTarget;
  12.         value = value or 1;
  13.     }, GraphEdge)
  14.    
  15.     return self
  16. end
  17.  
  18. return GraphEdge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement