Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base code taken and adapted from Ania Kubow's YouTube video, available here.

Bugs/ Issues fixed

  • Game was not repeating images - there were 12 different images, which meant the game was unwinnable.
    • Solution - delete half the images, and then copy the remaining six, so there were still twelve images, but there were two of each one.
  • Error message showing when two pairs matched and the game tried to continue after pairing: 'assignment to constant variable, checkForMatch' referencing line 91
    • Changed arrays from const variable to let variable, as was not resetting array correctly after each pair selection. This resulted in succes.
  • When game ends, aesthetic of text "Score: Congratulations..." did not work well.
    • Replaced text in H3 ('Score') with text message, meaning the word 'Score' was overwritten as well, which worked better.

About

A simple memory game created to practise using functions in JavaScript, as well as looping arrays, creating and amending HTML elements using JS, Event Listeners, setInterval, setAttribute, getAttribute, and mathRandom.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages