Skip to content

adamhu714/pokedex

Repository files navigation

Pokédex

Read-Execute-Print-Loop (REPL) Pokédex Application with caching.

Features:

  • Ability to catch and inspect Pokémon in the terminal
  • Usage of PokéAPI to deliver up to date and full Pokémon information
  • Caching of PokéAPI pages to optimize user experience
  • CLI input sanitation
  • Unit testing to ensure smooth and robust development and maintenance

Contents

Getting Started

Prerequisites

Ensure you have Go v1.22+ installed on your system.

Building and Running the Application

From the project's root directory, use the Go command-line tool to build the executable:

go build -o pokedex

This command generates an executable named pokedex.

Execute the binary in your terminal to enter the Pokédex command line:

./pokedex

The command line should show the following prompt:

pokedexCLI > 

Exit the CLI tool with the exit command or by pressing CTRL + C.

Back To Top

Commands

catch <pokemon_name/id>

Accepts one argument: <pokemon_name/id>

Attempt to catch a pokemon. Rolls a random integer between 1 and the pokémon's base experience. Stronger pokémon have higher base experience. If the roll is 50 or lower, the pokémon is caught and added to the pokédex.

Example usage:

pokedexCLI > catch mew
pokedexCLI > catch 151

Back To Top   Back To Commands

inspect <pokemon_name/id>

Accepts one argument: <pokemon_name/id>

Prints information about a specified pokémon, if they have been added to the pokédex.

Example usage:

pokedexCLI > inspect mew
pokedexCLI > inspect 151

Back To Top   Back To Commands

pokedex

Lists all the pokémon that have been added to the pokédex so far.

Back To Top   Back To Commands

map

Lists all the location areas on the following page of location areas from the PokéAPI.

Back To Top   Back To Commands

mapb

Lists all the location areas on the previous page of location areas from the PokéAPI.

Back To Top   Back To Commands

explore <location_area_name/id>

Accepts one argument: <location_area_name/id>

Lists the pokemon in a specified location area.

Example usage:

pokedexCLI > explore eterna-city-area
pokedexCLI > explore 2

Back To Top   Back To Commands

help

Lists all commands and their description.

Back To Top   Back To Commands

exit

Exits the CLI tool.

Back To Top   Back To Commands

Unit Tests

image

Back To Top

About

Command Line Pokédex Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages