The user needs a method to set their active pokemon. The syntax should be p!ka set active <id> where id is the id of the pokemon desired. This should update the active pokemon for that trainer in the persistence layer to the chosen pokemon.
Additional consideration: Since pokemon ids are currently an autoincremented integer and not specific to a trainer, care should be taken to ensure that a pokemon not belonging to a trainer can't be their active pokemon. A future code change could potentially take care of this by having each trainer's pokemon have their own domain of ids. But for now a simple check that the pokemon belongs to the trainer should suffice.
The user needs a method to set their active pokemon. The syntax should be
p!ka set active <id>where id is the id of the pokemon desired. This should update the active pokemon for that trainer in the persistence layer to the chosen pokemon.Additional consideration: Since pokemon ids are currently an autoincremented integer and not specific to a trainer, care should be taken to ensure that a pokemon not belonging to a trainer can't be their active pokemon. A future code change could potentially take care of this by having each trainer's pokemon have their own domain of ids. But for now a simple check that the pokemon belongs to the trainer should suffice.