jappe999 / project-cards

Cards Against Humanity App
https://project-against-cards.herokuapp.com/
GNU General Public License v3.0
1 stars 0 forks source link

Cards of previous rounds return on other sessions when reloading #25

Closed jappe999 closed 5 years ago

jappe999 commented 5 years ago

Expected Behavior

When I exit the game and rejoin that same game my chosen cards should be removed

Current Behavior

When I reload the game page when I've already submitted cards those cards are not removed from that round and are shown to another client each round again.

Possible Solution

It's possible the problem lies in the array of played cards for each round in the front-end. But it's also possible that the socket server sends those cards with each request.

Steps to Reproduce (for bugs)

  1. Open a game in 3 or more clients.
  2. Choose and play cards in a non-Czar client
  3. Refresh or exit and rejoin a game
  4. Choose and play again, but now in all clients
  5. Spot card chosen before the reload.

Context

The Czar can choose a combination that is not played by any player that round. The player who chose the combination in a previous round wins without choosing that combination.

Your Environment