DEV Community


Posted on


Weekend Challenge - RPS

I releasing this blog a little bit later due because we started with databases this week and it kept me very busy. But back to the "RPS" app, we had to make a programme that played "Rock, Paper and Scissor". We were meant to make an "AI" that randomly chose an attack and then later on as a bonus challenge we could add multiplayer. I was a bit too ambitious at the start and thought I could start with multiplayer.

I spent a lot of time stuck on this challenge because of this. I got the app to send the players data but I had issues trying to compare the information. After seeing someone else's work it clarified a few things for me. Mainly that I should've started with the computer and moved onto multiplayer. I still think I need to get understand the way the controller works a bit better. Although with this week I think I have a better grasp of it.

Over the Christmas holidays, I'll revisit all the weekend challenges to hopefully build on the fundamentals. Maybe I'll have new and creative ways to solve the previous problems.

Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesnā€™t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.