Coder Social home page Coder Social logo

tc-cards's Introduction

Day One Project

Goal

Goal Image


Start-up and Installation

  1. Visit tc-cards

  2. Fork the repository

  3. Click the green Code button, and copy the clone url

  4. Open your terminal or Git Bash

  5. If you already have a repos folder:

    $ cd repos

    or if you need to create a repos folder:

    mkdir repos
    cd repos
  6. Use git to clone the repository from Github

    git clone <url_from_github>
  7. Install the dependencies and start the server.

    $ cd tc-cards
    $ npm install

Steps to Completion

Creating the table connection

  1. Open js/table.js in your editor
  2. Find where socket.emit() accepts a string 'table-connect'
  3. The method's second parameter accepts the unique table id
  4. Replace 'id123' with the variable 'tableId' to pass in the correct table id to the server for connection

Displaying the QR Code

  1. Open js/table.js in your editor
  2. Find where VSCode is signalling an error in your JS syntax
  3. The method for creating a qr code is incorrect. Change the method to 'qrCodeGenerator'

Creating the deck connection

  1. Open js/deck.js in your editor
  2. Find where "serverURL" (a string) is passed into the io.connect() method
  3. Replace the string with the variable serverURL (without quotes) in order for socket.io-client to connect with the server

Correcting the card throw strength property

  1. Open js/deck.js in your editor
  2. Find where 0 is assigned the value for 'strength'
  3. Replace 0 with 'strength' (not in quotes) to assign the value from the strength parameter to the strength property for each card

Running the Project

  • To run the project after you fixed the changes, open your terminal and run:
npm run start
  • Enjoy!

tc-cards's People

Contributors

bryantellius avatar mssever 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.