private void preparePlayer() {
        if (m_timing) {
            m_timer = new Timer(1000, new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    ((TimerLabel)lblClock0).tick();
                }
            });
            m_timer.start();
        }

        if (m_pokemon.length > m_length) {
            Pokemon[] temp = new Pokemon[m_length];
            for (int i = 0; i < m_length; i++) {
                temp[i] = m_pokemon[i];
            }
            m_pokemon = temp;
        }
        
        createButtons();
        setMoves(0);

        btnSwitch.setEnabled(false);
        btnSwitchCancel.setEnabled(false);
        btnMove.setEnabled(false);
        btnMoveCancel.setEnabled(false);

        m_pp = new int[m_pokemon.length][Pokemon.MOVE_COUNT];
        for (int i = 0; i < m_pp.length; ++i) {
            for (int j = 0; j < Pokemon.MOVE_COUNT; ++j) {
                m_pp[i][j] = -1;
            }
        }

        m_maxPp = new int[m_pokemon.length][Pokemon.MOVE_COUNT];
        m_sortedPokemon = new ArrayList<Integer>();
        for (int i = 0; i < m_pokemon.length; i++) {
            m_sortedPokemon.add(i);
            Pokemon poke = m_pokemon[i];
            m_visual.setPokemon(m_participant, i, poke);
            VisualPokemon p = m_visual.getPokemon(m_participant, i);
            int hp = poke.calculateStat(Pokemon.S_HP, ServerLink.getGeneration(), 0);
            p.setHealth(hp, hp);
            for (int j = 0; j < m_pokemon[i].moves.length; j++) {
                String move = m_pokemon[i].moves[j];
                for (PokemonMove m : m_moveList) {
                    if (m.name.equalsIgnoreCase(move)) {
                        m_maxPp[i][j] = m.maxPp * (5 + m_pokemon[i].ppUps[j]) / 5;
                        m.pp = m_maxPp[i][j];
                        break;
                    }
                }
            }
        }
    }