diff --git a/Assets/Scripts/DatabaseClasses/Room.cs b/Assets/Scripts/DatabaseClasses/Room.cs index c9f9830..acf0a27 100644 --- a/Assets/Scripts/DatabaseClasses/Room.cs +++ b/Assets/Scripts/DatabaseClasses/Room.cs @@ -33,6 +33,25 @@ public List GetQuestionList() return new List(questions.Values); } + public List GetPropositionsByPlayer(Player player) + { + List propositions = new(); + + foreach (Question question in GetQuestionList()) + { + foreach (Proposition proposition in new List(question.propositions.Values)) + { + if (proposition.owner.id == player.id) + { + propositions.Add(proposition); + break; + } + } + } + + return propositions; + } + public void setPlayersAreReady(int _state) { currentState = _state;