Connect blocks to the top left block by clicking the next colour you want to connect. Try to flood the entire field with one colour.
I tried to make a simpler version of gotrhythm's game which can be found here: http://scratch.mit.edu/projects/24999293/ How it works: This version works by storing a list with a value for each block in the grid. If the value is 1 then the block is connected to the top left corner. It starts with just the top left block having a 1. Each block then keeps checking if any of its neighbours are connected (have a 1 in the list). If it finds a connected neighbour and it's also the right colour then it sets its value in the array to 1 too. Any blocks that are connected keep changing their colour to whatever the current fill colour is.