} else {
/* Else, add it to box if space is available */
if(boxNumber < 9) {
/* Avoid null pointers */
if(boxes[boxNumber] == null)
boxes[boxNumber] = new PokemonBox();
if(boxes[boxNumber].getPokemon() == null)
boxes[boxNumber].setPokemon(new Pokemon[30]);
/* If there's space in this box, add it to the box */
if(boxPosition < 30) {
boxes[boxNumber].setPokemon(boxPosition, getPokemonObject(pokemons));