Guest User

Untitled

a guest
Jun 14th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment