Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Rock, Paper, Scissors. (Lizard + Spock can be enabled after playing).

accessibility, bem
Grego•1,430
@Grego14
A solution to the Rock, Paper, Scissors game challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

Proud completed the challenge... It took time but next time I'll focus more on doing the challenge rather than making it look good.

What challenges did you encounter, and how did you overcome them?

Most of my problems were with the design, but not that difficult and I was able to solve them easily. I just didn't want to use a lot of styles and that's what got complicated for me.

What specific areas of your project would you like help with?

Help with using media querys and preloading resources using javascript. I've been looking at a few ways to preload resources and ended up using this one:

function preloadSource(url, source, callback)  { 
  source.src = url

  if(callback)  { 
    source.addEventListener('load', () =>  { 
      callback(source.src) 
    }, {once: true}) 
  } 
}

preloadSource(soundsUrls.win, sounds.win)
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Grego's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License