Giter VIP home page Giter VIP logo

javascriptproject2's Introduction

The project is an attempt to make a card matching. Cards being by being face up for a small time period, half a second maybe, to give the player a chance to memorise them. The player then clicks on each card to attempt to match it with its pair.

I started by taking the Loves Maths challenge to use the game area. I removed the main game and replaced it with a grid area of 10 divs. I then took out three of the buttons and changed the addition game button to a start button.

I wanted to use a font awesome start button but so far have been unable to make it work. The button displayed it different from the start button I wanted.

I have tried to use code from Code Institute challenges to change the card border to red when clicked and to change the card color. So far this has not worked.

I need to asign a random color selection from an array and pair the cards in order to match them and increase the score.

The code to change the colours when the cards are clicked on seems to work in a different IDE JSFiddle but not on Gitpod.

Have added more code to cycle thorugh the array of colours twice in order to assign cokour pairs to the DOM using getElementsByClassName.

I want to chage each div

"Uncaught TypeError: color.style is undefined" in console. "TypeError: card.addEventListener is not a function" in JSFiddle.

I have failed to loop through the divs displaying the cards in order to assign them new colours from the cardArray. I cannot figure out what the correct syntax is supposed to be.

javascriptproject2's People

Contributors

theothermrusername 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.