Skip to main content
Post Closed as "Opinion-based" by Bálint, doppelgreener, Jimmy, Kromster, Gnemlock
deleted 49 characters in body
Source Link
Kromster
  • 10.7k
  • 4
  • 54
  • 67

I have implemented A* on a Tile Based Game, my Tile class contains a lot of info like Position, TileType, Items, Characters, etc on it. Right now that class has the Edges references(neighbours), movement cost, etc. Should I create a new Class like Node to just contains the Pathfinding related info?

Any suggestions will be greatly appreciated.

I have implemented A* on a Tile Based Game, my Tile class contains a lot of info like Position, TileType, Items, Characters, etc on it. Right now that class has the Edges references(neighbours), movement cost, etc. Should I create a new Class like Node to just contains the Pathfinding related info?

Any suggestions will be greatly appreciated.

I have implemented A* on a Tile Based Game, my Tile class contains a lot of info like Position, TileType, Items, Characters, etc on it. Right now that class has the Edges references(neighbours), movement cost, etc. Should I create a new Class like Node to just contains the Pathfinding related info?

Source Link

Should I separate the Pathfinding info from the Tile Info class?

I have implemented A* on a Tile Based Game, my Tile class contains a lot of info like Position, TileType, Items, Characters, etc on it. Right now that class has the Edges references(neighbours), movement cost, etc. Should I create a new Class like Node to just contains the Pathfinding related info?

Any suggestions will be greatly appreciated.