This would probably be easier to do after we create a user interface.
I guess we could have it toggled to a key press in the personPlayer class.
For example "If 'b' is pressed and user right clicks then attempt to create a building here"
Buildings are already updating the grid, though inefficiently. It calls the grids method, createGrid, which we calculates the entire grid. This is extremely inefficient. The grid probably needs a new method which allows node locations to be updated individually when necessary.
Buildings should not be allowed to be placed in "blocked" locations, whether from an obstacle, a unit, or another building.
This would probably be easier to do after we create a user interface.
I guess we could have it toggled to a key press in the personPlayer class.
For example "If 'b' is pressed and user right clicks then attempt to create a building here"
Buildings are already updating the grid, though inefficiently. It calls the grids method, createGrid, which we calculates the entire grid. This is extremely inefficient. The grid probably needs a new method which allows node locations to be updated individually when necessary.
Buildings should not be allowed to be placed in "blocked" locations, whether from an obstacle, a unit, or another building.