Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

PWA made with React and SCSS - Grizzly, Cowboy, Ninja

Diarrahโ€ข 3,418

@Diarrah

Desktop design screenshot for the Rock, Paper, Scissors game coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
4advanced
View challenge

Design comparison


SolutionDesign

Solution retrospective


I made this a PWA(which means it's fully installable on your phone or computer) where you can play either Grizzly, Cowboy, Ninja or Rock, Paper, Scissors.

I made custom pictures for Rules slider for GCN with Figma.

Please tell me your thoughts and commentary!

Community feedback

P
ApplePieGiraffeโ€ข 30,545

@ApplePieGiraffe

Posted

Greetings, Diarrah! ๐Ÿ‘‹

Amazing work on this challenge! ๐Ÿ™Œ You added a pretty awesome twist to this challenge and the animations and transitions of elements make it even cooler! ๐Ÿคฉ Making it a PWA is also a pretty sweet idea! Nice job!!! ๐Ÿ‘

Keep coding (and happy coding, too)! ๐Ÿ˜

1

@creadordeloscielos

Posted

Excellent, it is incredible what you can do, I am learning and I would like to be at your level. which I think is not impossible but it does require a lot of work and effort and dedication. Greetings from Mexico ๐ŸŒฎ๐ŸŒฎ๐ŸŒฎ

1
Roc Tanweerโ€ข 2,500

@RocTanweer

Posted

Hello ๐Ÿ‘‹ Really nice work ๐Ÿ‘ One day I will make something like that too..! Will you tell me how you gave the downloading feature to it please?

0

Diarrahโ€ข 3,418

@Diarrah

Posted

@RocTanweer it's called a PWA. This is how I did it: https://www.youtube.com/watch?v=bQkCTI_8c84&list=WL&index=95&t=948s

0
P
Matt Studdertโ€ข 13,611

@mattstuddert

Posted

Great to see you posting another solution, Diarrah! Love that you've added your own spin on it providing the two different game modes. Also, building it as a PWA and including the animations are excellent touches ๐Ÿ™Œ

Your React code looks good, although I'd say it could be broken down a little bit more to "componentise" and separate out your code further. For example, your Battleground.js component is pretty big with quite a bit of logic.

Also, you're setting the click listeners on div elements, which aren't interactive. This means the game is currently inaccessible to anyone using anything other than a mouse/trackpad to play. Using interactive elements like button as the triggers would be a big improvement ๐Ÿ™‚

I hope you enjoyed the challenge! Did you learn anything new while working through the project?

0

Diarrahโ€ข 3,418

@Diarrah

Posted

@mattstuddert I'm confused on what you mean about the eventListeners on the div. When I play on my phone it works just fine as well.

0
P
Matt Studdertโ€ข 13,611

@mattstuddert

Posted

@Diarrah sorry, I should have also mentioned phones in that list! In the Battleground.js component you're using this to select the elements to apply click listeners to: document.querySelectorAll('.battleground__weapon'). These elements are all div elements, which are not interactive elements. This means the game is inaccessible to anyone navigating using a keyboard or other assistive technologies. As front-end developers, a big part of our job is to build accessible interfaces. If you try navigating the game using your keyboard you'll see it's not possible to select the different options.

0
Vytasโ€ข 435

@vytkuklys

Posted

Hey Diarrah,

I am just here to write that this is one cool piece of work right here. Also here to thank you for inspiring a couple of intriguing ideas through your work. And to ask you for the names of the tools that you used on your project because your code seems to be encompassing some fanciness that I am clearly not yet aware of

Best of Luck!

0

Diarrahโ€ข 3,418

@Diarrah

Posted

@vytkuklys Thanks man! It looks a lot more impressive than it is lol. The only real other tool I used was Figma - it's a thing that let's you edit/make SVGs (this is what I used for the GCN rules swiper. Also, I used SwiperJS to make that little rules swiper thing. The only other thing I used was ReactJS.

1

Please log in to post a comment

Log in with GitHub
Discord logo

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