daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class World {
  2.     World(int width, int height, int stepsPerSecond) {
  3.         _grid = new Grid(width, height);
  4.         _mover = new UnitMover(_grid, Pathfinding.Find);
  5.         ...
  6.     }
  7.     ...
  8. }
  9.  
  10. static class Pathfinding {
  11.     public delegate bool OccpiedPred(Int2 cell);
  12.  
  13.     public static List<PathSegment> Find(OccpiedPred occupied, Int2 from, Int2 to) { ... }
  14.  
  15.     ...
  16. }
  17.  
  18. class UnitMover {
  19.     public delegate Path FindPath(Pathfinding.OccpiedPred occupied, Int2 from, Int2 to);
  20.  
  21.     public UnitMover(Grid grid, FindPath findPath) { ... }
  22.    
  23.     ...
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top