Tag Info

New answers tagged

0

You just need a simple DFS algorithm ! Here you go: Run DFS every time player go on a empty block. Your DFS should navigate empty block until reach a filled (blue) block. this is stop condition of your DFS. Then in DFS, check if all DFS-branches stuck to a filled block. not your game-world border. if yes, Run That DFS again, and fill all blocks which DFS ...


0

It is unclear as to why you are using a perpendicular. There isn't enough detail to describe the problem you are working. However, perhaps this will help. A 2D vector can be described using the values (x, y). The left hand perpendicular and the right hand perpendicular are easily calculated. The left hand perpendicular of (x, y) is (-y, x). The Right hand ...



Top 50 recent answers are included