Coloring encircled tiles
Not really a programming question, but rather a game logic question. I'm making a risk/civilization-like game. When you move a unit to a tile, you capture the tile and it gets colored. I'm trying to implement a feature that if you encircle uncaptured tiles, you capture all of them. Here's a picture: https://prnt.sc/ff8n6s
The tiles are individual game objects that are self-aware of their position. I have made a pathfinding script based on Dijkstra's algorithm, and tried to use that one to let a tile know if it's encircled or not, but it doesn't seem like a very efficient way of doing it.
Any clever ideas? :) (PS, it's my first game so don't critique my art skills! :p)
This might be better as a forum Q? (the FAQ explains the difference)
Your answer
Follow this Question
Related Questions
change scripts to show an image to spell 0 Answers
How to find match in 4 in a Row Game. 1 Answer
Detect all object are touching as one cluster 0 Answers
Simple `Match 3+ in a row` pattern 0 Answers
Trying to dynamically animate a Gimbal? 0 Answers