jappe999/project-cards

Cards of previous rounds return on other sessions when reloading

jappe999 opened this issue · 0 comments

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

  • Version used: NA
  • Environment name and version (e.g. Chrome 39, node.js 5.4): All
  • Operating System and version (desktop or mobile): All