This is a neat programming game.

http://store.steampowered.com/app/370360/

Something neat is that I think I solved this differently than expected. My algorithm is rather weak in this but it solved the problem here.