Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. public class RootSection<T, TChild> : Section<T>
  2. where T : Section<T>
  3. where TChild : Section<TChild>
  4. {
  5. public List<TChild> ChildSection { get; } // duplicate
  6. }
  7.  
  8. public class MiddleSection<T, TChild, TParent> : Section<T>
  9. where T : Section<T>
  10. where TChild : Section<TChild>
  11. where TParent : Section<TParent>
  12. {
  13. public List<TChild> ChildSection { get; } // duplicate
  14. public TParent Parent { get; } // duplicate
  15. }
  16.  
  17. public class BottomSection<T, TParent> : Section<T>
  18. where T : Section<T>
  19. where TParent : Section<TParent>
  20. {
  21. public TParent Parent { get; } // duplicate
  22. }
  23.  
  24. public class Section<T>
  25. where T : Section<T>
  26. {
  27. List<T> AdjacentSections { get; }
  28. }
  29.  
  30. public class Map : RootSection<Map, Biome> { } // (T, TChild)
  31. public class Biome : MiddleSection<Biome, Landform, Map> { } // (T, TChild, TParent)
  32. public class Landform : MiddleSection<Landform, Tile, Biome> { } // (T, TChild, TParent)
  33. public class Tile : BottomSection<Tile, Landform> { } // (T, TParent)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement