Skip to content

alacorr/tc-cards

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 51.7%
  • CSS 40.4%
  • HTML 7.9%