Coder Social home page Coder Social logo

hannahkim313 / memory-card Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8.14 MB

A memory card game using a Nintendo Amiibo API to display Animal Crossing character cards.

Home Page: https://memory-card-ehz.pages.dev/

HTML 4.17% JavaScript 50.06% CSS 45.76%
amiibo-api animal-crossing css html javascript memory-card react vite

memory-card's Introduction

Memory Card Game: Animal Crossing Edition

https://memory-card-ehz.pages.dev/

Project Summary

This project exercise, created by The Odin Project, is a simple memory card game to practice working with hooks to manage state and side effects while fetching and using data from an API.

Features Overview

Demo:

How to Play

The Rules

This is a simple memory card game that tests your ability to remember and select different cards each round. To play, click on a card that has not been selected yet. If your memory serves you right, the cards will shuffle and you get to play again until all 8 cards are selected. If you select a previously selected card, the game ends!

What Happens When You Win

Congratulations! To start a new game, choose any of the two options:

  1. Refresh the page.
  2. Click on any card.

Both methods will reset the round and scoreboard as well as display new cards.

What Happens When You Lose

When you click on a card that has already been selected, the cards will shuffle and both the round number and current score will reset to their default value. The cards remain the same until you select all 8 cards! To continue playing, click on any card and try and beat your best score.

Reflection

After completing this project, I found myself getting the hang of working in a React environment and using state and effect hooks. This is only my second time working with APIs, so I learned more about using try/catch blocks and the process of retrieving data that may or may not contain null/undefined values. It's important to consider that some data is sparse. Although this is my second time working with APIs, it is my first project working with APIs in React. I implemented the AbortController Web API to handle React's strict mode from producing multiple API calls. My research at the time led me to believe this was an effective solution, but I may find another solution as I progress through the React curriculum. Moving forward, I definitely plan to look into creating my own custom hooks and components to create cleaner code. This was not a major objective for this project since I am still getting used to working with React and the React workflow.

Credits

  • Favicon icon by Vitaly Gorbachev on Freepik
  • Animal Crossing background image by jotaauvei on DeviantArt
  • Amiibo API by Nevin Vu

memory-card's People

Contributors

hannahkim313 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.