I have 2 chat rooms, in every room I have 5 users and input field , where every user can enter some number and submit it to validate on server, if number equal (for example) to 5 than users in this room win, and users in other room lose, so I have 5 users that win and 5 that lose.
So, what I want: when one of team win, than redirect users that wins to some WIN page, and at the same time redirect users that lose to LOSE page. And !THIS IMPORTANT! if some users for example was offline but his team won or lose , than when the next time user log in show LOSE or WIN page which depends on whether his team won or not.
So I see 3 problems for which I do not find a solution:
- Redirect group of users
- Track when one of team win (track for all users that play game)
(Blaze if unsuitable)
- If some team wins and user was offline , hen the next time user log
in show LOSE or WIN page
I know that a lot of questions and they are very extensive, but could not find the solution, help somebody !
EDIT : Important ! When someone wins I delete all chat rooms and messages, (Rooms.remove() etc.) And new game starts every 3 days