The game I am working on is based on a maze where each level is procedurally generated. The pathfinding grid is a 2D array where each node holds its connections. Path requests are handled one at a time so there can't be two path calculations going on simultaneously. So far I have each node hold its data required for the A* (H,F,G scores and its parent) and manipulate them directly in the algorithm. Since the nodes are the actual nodes and not copies of them, every time the algorithm runs the data changes permanently and I have to manually set them on default values before the next run.
So my questions are :
1) Is this a valid way of handling pathfinding in a game?
2) What other data manipulation techniques I could use in order to avoid that?
If you need a copy of the code it's all on my github under Pathfinding and Managers/PathfindingManager.