PHPWarrior\Game::choose_profile PHP Method

choose_profile() public method

public choose_profile ( )
    public function choose_profile()
    {
        $profile = UI::choose('profile', array_merge($this->profiles(), [[':new', __('New Profile')]]));
        if (is_array($profile) && $profile[0] == ':new') {
            $profile = $this->new_profile();
        }
        /*
        if profile == :new
          profile = new_profile
          if profiles.any? { |p| p.player_path == profile.player_path }
            if UI.ask("Are you sure you want to replace your existing profile for this tower?")
              UI.puts "Replacing existing profile."
              profile
            else
              UI.puts "Not replacing profile."
              exit
            end
          else
            profile
          end
        else
          profile
        end
        */
        return $profile;
    }