A California appellate court has ruled that two former Los Angeles Police Department officers were rightfully fired after they were caught playing Pokemon Go on duty instead of responding to a robbery in progress.

The Second District Court of Appeal ruled on Friday that the LAPD was justified in discharging Louis Lozano and Eric Mitchell for misconduct in 2017, City News Service.

On April 15, 2017, a surveillance system in their patrol car captured the officers discussing how they could catch a ``Snorlax'' in the game, just five minutes after they said ``screw it'' to responding a robbery call at a Macy's near them in the Crenshaw area, according to court documents.

They were accused of later making false statements about their lack of response to the call and their involvement with Pokémon Go — for example, they said that they were only talking about the augmented-reality game (which became a worldwide craze for about a year) rather than actually playing it, NPR reports.

The officers were charged with multiple counts of on-duty misconduct: failing to respond to a robbery-in-progress call, making misleading statements to their commander when asked why they did not hear the radio, failing to respond over the radio when their unit was called during the robbery, failing to handle an assigned radio call, playing Pokémon Go while on patrol in their vehicle and making false statements to a detective during a complaint investigation. They pleaded guilty to the first and third counts, and not guilty to the rest.

The officers asked a court to overturn their firings, arguing among other things that the recordings of their private conversations were improperly used as evidence, but the Superior Court judge denied their petition. The appeals court upheld that decision.