We need to keep track of the game progress within a lobby.
Use Case
We need:
currSong: string (id of the song)
songsToPlay: number
currTime: number
isPaused: boolean
to keep track of what song the game is playing, if it is paused or being played, where the song is, and how many songs the game has left
We will initialize these variables when a lobby is created.
We will update these variables when we get a random song and when we play or pause it. A game will play a total of 5 songs, so we should initialize songsToPlay to 5 and decrement it each time a new song is retrieved.
Proposed Solution
Modify the member variables and constructor of the Lobby object inside packages/@aurgy/server/lib/lobby.ts
[ ] :wave: I may be able to implement this feature request
We need to keep track of the game progress within a lobby.
Use Case
We need:
currSong
: string (id of the song)songsToPlay
: numbercurrTime
: numberisPaused
: boolean to keep track of what song the game is playing, if it is paused or being played, where the song is, and how many songs the game has leftWe will initialize these variables when a lobby is created. We will update these variables when we get a random song and when we play or pause it. A game will play a total of 5 songs, so we should initialize songsToPlay to 5 and decrement it each time a new song is retrieved.
Proposed Solution
Modify the member variables and constructor of the Lobby object inside
packages/@aurgy/server/lib/lobby.ts
This is a :rocket: Feature Request