GithubHelp home page GithubHelp logo

flashcards-starter's Introduction

FlashCards Starter Kit

Fork This Repo

On the top right corner of this page, click the Fork button.

Setup

Clone down the forked repo (from your GitHub). Since you don't want to name your project "flashcards-starter", you can use an optional argument when you run git clone (you replace the [...] with the terminal command arguments):

git clone [remote-address] [what you want to name the repo]

Once you have cloned the repo, change into the directory and install the library dependencies using the command:

npm install

To verify that it is setup correctly, run npm test in your terminal. You should have skipped tests in your card test file show up.

Running node index.js from the root of your project should result in the following message being displayed in your terminal:

Your project is running...

Note that you will not need to you run this file until you are running your game file in Iteration 3. Prior to that, you should strive to use TDD to drive your code. You should check the functionality of your application by running your tests via npm test.

Where to Add Your Code

Create all of your feature code files in the src directory. Use the module.exports and require syntax to share code across files.

How to View Your Code in Action

Once you are working through Iteration 3, you will want to run the node index.js command in your terminal to run the game.

When the game is functioning appropriately, you will be prompted for each question, have the opportunity to select an answer, and will be given feedback. You will be able to play through the entire deck of cards:

flash cards example gif


Test Files Organization

Similar to feature code, your test code needs to be put in a specific place for it to run successfully.

Put all of your test files in the test directory. As a convention, all test filenames should end with -test.js. For instance: card-test.js.

Running Your Tests

Run your test suite using the command:

npm test

flashcards-starter's People

Contributors

dependabot[bot] avatar hannahhch avatar kalikoze avatar niksseif avatar robbiejaeger avatar thatpamiam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

flashcards-starter's Issues

Iteration 2 - Round

  • Instantiate new Round object
  • Take a Deck of Cards as an argument
  • The current Card should be the first Card of the Deck
  • Round should keep track of turns, starting at 0
  • Round should keep track of incorrect guesses, which should be empty
  • Round should return the current Card being played
  • A turn can be taken, which increments the Round's turns regardless of answer
  • A correct guess can be evaluated with the appropriate feedback
  • An incorrect guess can be evaluated with the appropriate feedback, adding to incorrect guesses
  • The next Card becomes the current Card
  • After several turns the correct guesses percentage can be returned
  • The Round should be able to end with an ending message and correct guesses percentage returned

Incorrect answer in the dataset

Question #28 is as follows:

{
  "id": 28,
  "question": "Which prototype method returns an array of an object's property values?",
  "answers": ["Object.keys()", "Object.values()", "Object.assign()"],
  "correctAnswer": "Object.keys()"
}

The correct answer should be "Object.values"

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.