feat: add GetPropositionsByPlayer
This commit is contained in:
parent
1df95d8eca
commit
a9fd87527e
@ -33,6 +33,25 @@ public List<Question> GetQuestionList()
|
|||||||
return new List<Question>(questions.Values);
|
return new List<Question>(questions.Values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Proposition> GetPropositionsByPlayer(Player player)
|
||||||
|
{
|
||||||
|
List<Proposition> propositions = new();
|
||||||
|
|
||||||
|
foreach (Question question in GetQuestionList())
|
||||||
|
{
|
||||||
|
foreach (Proposition proposition in new List<Proposition>(question.propositions.Values))
|
||||||
|
{
|
||||||
|
if (proposition.owner.id == player.id)
|
||||||
|
{
|
||||||
|
propositions.Add(proposition);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return propositions;
|
||||||
|
}
|
||||||
|
|
||||||
public void setPlayersAreReady(int _state)
|
public void setPlayersAreReady(int _state)
|
||||||
{
|
{
|
||||||
currentState = _state;
|
currentState = _state;
|
||||||
|
Loading…
Reference in New Issue
Block a user