You don't have to turn them ALL green looney. After I did it a few times I realized when you get down to four the wall goes back.
I start at the left line and make them all green then the next line and so on. When you get to the last line just keep clicking and trying different ways.
There is probably a definite way to do it but I don't have the formula. Good luck.