Avoid touching tiles that are black, try getting to the other side. The tiles swap when they reach 0, and they decrease each time you move. This is for a school project btw, so don't expect anything to come of it.