Is there an algorithm for combining threat range with arbitrary move range on 2D grid?
问题 I'm building a simple 2D grid based game and am looking for a way to calculate the "threat" area that each character can exert on the game board. Threat from the current spot is easy to calculate - this is the red diamond below. But I'm looking to combine this information with an arbitrary "can walk here" area (orange). Together the algorithm will give me a combination of all tiles that my character can attack from all available moves and current position. Of course I can just iterate over