handleTileCollision refactor