-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Refactor lobby to handle
Setting seats
- [ ] Backend: Seats mechanism
- [ ] Frontend: Seats mechanism
First player which joins the room has seat = 0. Then rest of the players must choose their seat. Free seat has assigned id of player from seats array for example:
const playerSeats = ["Adam", "Bartek", "Celina", "Damian", "Ewa"]
// Adam has seat number 0, Bartek 1 and so on
// When we choose seat between Adam & Bartek we recive Bartek's seat number.
// We send it to backend and at backend we increase every seat higher or equal than reviced seat number
// When players disconnects seats must be decreased