UCLA-Creative-Labs / spot-the-song

MIT License
2 stars 0 forks source link

🚀 Feature: add a boolean played for each song in a lobby #14

Open darren2hang opened 1 year ago

darren2hang commented 1 year ago

We want to only play each song once in a game. Thus, we want to use a boolean played to keep track of whether or not the song was played.

Use Case

When we implement getRandomSong, we want it to choose a random song from the lobby's list of songs and if played == false then we will return the song and set played to true. Otherwise, we will find a new random song.

Proposed Solution

In the Lobby object's songMetadata array, add another feature called played to each entry. played should be initialized to false

Modify the synthesizePlaylist function inside packages/@aurgy/server/lib/lobby.ts


This is a :rocket: Feature Request