Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class World {
- World(int width, int height, int stepsPerSecond) {
- _grid = new Grid(width, height);
- _mover = new UnitMover(_grid, Pathfinding.Find);
- ...
- }
- ...
- }
- static class Pathfinding {
- public delegate bool OccpiedPred(Int2 cell);
- public static List<PathSegment> Find(OccpiedPred occupied, Int2 from, Int2 to) { ... }
- ...
- }
- class UnitMover {
- public delegate Path FindPath(Pathfinding.OccpiedPred occupied, Int2 from, Int2 to);
- public UnitMover(Grid grid, FindPath findPath) { ... }
- ...
- }
Add Comment
Please, Sign In to add comment