Battling

- singles works (teampreview , attackign and switching and mega evolving)
- doubles works but no targetting yet (TODO, not sure about team preview?)
- Fixed a problem in the request case when we switch

TODO :

- a better UI
- targetting system for doubles
- teampreview for doubles
- canceling support?


Sounds good, forgot the actives one where on the front
On 29 Dec 2014 15:06, "Nam Thai" <notifications@github.com> wrote:

> In app/src/main/java/com/pokemonshowdown/app/BattleFragment.java
> <https://github.com/NamTThai/PokemonShowdownAndroidClient/pull/60#discussion-diff-22312463>
> :
>
> > +        for (String command : actionCommands) {
> > +            stringBuilder.append(command);
> > +            idx++;
> > +            if (idx != actionCommands.size()) {
> > +                stringBuilder.append(",");
> > +            }
> > +        }
> > +        stringBuilder.append("|" + getRqid());
> > +        Log.d(BTAG, stringBuilder.toString());
> > +        MyApplication.getMyApplication().sendClientMessage(stringBuilder.toString());
> > +    }
> > +
> > +    private PokemonInfo getCurrentActivePokemon() {
> > +        int idx = 0;
> > +        PokemonInfo currentPokemon = null;
> > +        for (PokemonInfo pokemonInfo : getPlayer1Team()) {
>
> Wth. Arent you simply checking if playerTeam[mCurrentActive].isActive?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/NamTThai/PokemonShowdownAndroidClient/pull/60/files#r22312463>
> .
>