Introduced getTileNumber for collision detection. Player stops on collision