Skip to content

A variant of 'The Famous Color Game'. This app uses the PokeAPI (https://pokeapi.co/) to run a Pokemon guessing game.

Notifications You must be signed in to change notification settings

devarrowsmith/national-pokedex-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The National Pokédex Game 🌾

Background

The JavaScript Color Game is a popular introductory DOM manipulation project. FreeCodeCamp.org have a tutorial on it here. It's a fun project, and well worth a go if you haven't done it before.

I decided to create a variant of the color game with two core differences from the original:

  • It would be a React.js app with component based architecture
  • It would use data fetched from the PokéAPI (a Pokémon API) instead of colors

This game is the outcome. You can play it here.


Motivation

One week I decided to take a break from work and education. I wanted to create something just for fun.

The idea of creating a variant of the Color Game using the PokeAPI had been in my mind for a while but it was a low priority project. I decided to implement this as a React app so that I could improve my React skills while making something nice just for me 😊✨

Rather than controlling the UI via direct DOM manipulation this version of the game relies on state updates and component re-renders. In functional terms it's very similar to the JavaScript color game, but in structural terms it's quite different.


Screenshots

Screenshot of the app. A header poses the question 'Which pokémon has National Pokédex Number 805?'. The header also shows a reset button, three difficulty buttons and a lives counter. Below this is a grid showing Pokémon images and names. Screenshot of the app. Two of the pokémon in the grid have been clicked on. These were the wrong choices, and so their images have been replaced with images of the pokemon Ditto, under which is the text 'Try again!'. Two lives from the Lives counter have greyed out. Screenshot of the app. The correct Pokémon (Stakataka) has been selected. All Pokémon aside from the correct one have been replaced with images of the pokemon Victin, under which is the text 'You win!'. The header now shows the text 'You did it!'.


Installation

The game is hosted on GitHub Pages and can be run from there.

To install the repo locally:

  1. Clone this repo.
  2. Run npm install from root.
  3. To run the repo locally run npm start.

Framework

Built with React. Styled with styled-components.


Credits

This application uses Open Source components. You can find the source code of their open source projects along with license information below. Huge thanks to all of the people who contribute to this work ❤️️

  • Project: React
    Copyright (c) Facebook, Inc. and its affiliates.
    License: MIT

  • Project: styled-components
    Copyright (c) 2016-present Glen Maddern and Maximilian Stoiber
    License: MIT

  • Project: PokéAPI
    Copyright (c) © 2013–2020 Paul Hallett and PokéAPI contributors.
    License: BSD 3-Clause

  • Pokémon and Pokémon character names are trademarks of Nintendo.

About

A variant of 'The Famous Color Game'. This app uses the PokeAPI (https://pokeapi.co/) to run a Pokemon guessing game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published