Completed functionality to shift tiles