That problem is NP-hard, so an efficient strategy to calculate the optimal moves would be a major breakthrough in computer science. Of course, there might be a greedy strategy, but not an efficient one, e.g. that works in exponential time.
To prove that it really is NP-hard, we will reduce vertex cover to your problem.
Let $G$ be the input graph. We will use $|V|+1$ colors, one for each vertex, and one "border color" (diagram below uses gray). First, for each edge, put $|V|$ squares in a row using the colors of the vertices, and then surround it with a border. Then surround it again, each half of the perimeter with the colors of incident vertices.
Minimum vertex cover gives us an optimal strategy: first flood the cover-colors, then border, and then again all the vertex colors. It works, because after flooding the last border color, we will still have to flood all the colors of other vertices, so it is suboptimal to flood any "unnecessary" vertices colors before. Also, it is not optimal to flood border color more than once, as it is sufficient to perform only the last border-color flood.
I hope this helps $\ddot\smile$