Filled in moveTiles() method