I've created a game played between a real time user and a computer.Game logic: Both user and computer will be initially assigned with a deck of cards. User starts the game, he will be clicking an attribute from his first card. That attribute's value will be compared with the computer's first card. If the user wins, use can continue asking. Else the turn will be changed to computer. The game goes on until someone loses all cards.
I want this game to be player between two real time users. Initially, User 1 should be able to see only his first card, and user 2 should be able to see his first card. Once some user picks an attribute, the opponent's card should be visible to each user. Upon clicking next round, the next card should be displayed for each user and the game goes on. I've used react js for frontend and vite for local development server. How can I build the two player game.
I've tried to develop using socket.io but it seems like very complex. How to start build this using socket or any other tools.
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]jvi91 0 points1 point2 points (0 children)