Fixed the bug where the player would respawn on empty space. Obstacles now are unable to spawn at the start and at the end of the platform