private void HandlePartySelection()
    {
        if (Input.GetKeyDown(KeyCode.D))
        {
            ++currentMember;
        }
        else if (Input.GetKeyDown(KeyCode.A))
        {
            --currentMember;
        }
        else if (Input.GetKeyDown(KeyCode.S))
        {
            currentMember += 2;
        }
        else if (Input.GetKeyDown(KeyCode.W))
        {
            currentMember -= 2;
        }

        currentMove = Mathf.Clamp(currentMember, 0, playerParty.Pokemon.Count - 1);

        partyScreen.UpdatePartySelection(currentMember);

        if (Input.GetKeyDown(KeyCode.X))
        {
            var selectedMember = playerParty.Pokemon[currentMember];
            if (selectedMember.HP <= 0)
            {
                partyScreen.SetTextMessage($"{selectedMember} has no energy left to battle!");
                return;
            }
            if (selectedMember == PlayerUnit.Pokemon)
            {
                partyScreen.SetTextMessage($"{selectedMember} is already in battle");
                return;
            }

            partyScreen.gameObject.SetActive(false);

            if (prevState == BattleState.ActionSelection)
            {
                prevState = null;
                StartCoroutine(RunTurns(BattleAction.SwitchPokemon));
            }
            else
            {
                state = BattleState.Busy;
                StartCoroutine(SwitchPokemon(selectedMember));
            }
        }
        else if (Input.GetKeyDown(KeyCode.Z))
        {
            if (PlayerUnit.Pokemon.HP <= 0)
            {
                partyScreen.SetTextMessage($"Choose Pokemon to continue");
                return;
            }


            partyScreen.gameObject.SetActive(false);

            if (prevState == BattleState.AboutToUse)
            {
                prevState = null;
                StartCoroutine(SendNextTrainerPokemon());
            }

            else
            {
                ActionSelection();
            }
        }
    }