fix: add creationDate on proposition
This commit is contained in:
parent
c8272c0b99
commit
927e0dfbb9
@ -8,4 +8,5 @@ public class Proposition
|
|||||||
public string photoUrl;
|
public string photoUrl;
|
||||||
public Player owner;
|
public Player owner;
|
||||||
public string[] voters;
|
public string[] voters;
|
||||||
|
public double creationDate;
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,12 @@ public void GeneratePrompts()
|
|||||||
{
|
{
|
||||||
Dictionary<string, Proposition> propositions = new();
|
Dictionary<string, Proposition> propositions = new();
|
||||||
Player basePlayer = fullPlayers[0];
|
Player basePlayer = fullPlayers[0];
|
||||||
propositions.Add(Guid.NewGuid().ToString(), new Proposition() { owner = basePlayer });
|
|
||||||
|
propositions.Add(Guid.NewGuid().ToString(), new Proposition()
|
||||||
|
{
|
||||||
|
owner = basePlayer,
|
||||||
|
creationDate = DateTime.Now.ToOADate()
|
||||||
|
});
|
||||||
|
|
||||||
for (int i = 1; i < fullPlayers.Count(); i++)
|
for (int i = 1; i < fullPlayers.Count(); i++)
|
||||||
{
|
{
|
||||||
@ -252,7 +257,12 @@ public void GeneratePrompts()
|
|||||||
|
|
||||||
if (basePlayer.id != secondPlayer.id)
|
if (basePlayer.id != secondPlayer.id)
|
||||||
{
|
{
|
||||||
propositions.Add(Guid.NewGuid().ToString(), new Proposition() { owner = secondPlayer });
|
propositions.Add(Guid.NewGuid().ToString(), new Proposition()
|
||||||
|
{
|
||||||
|
owner = secondPlayer,
|
||||||
|
creationDate = DateTime.Now.ToOADate()
|
||||||
|
});
|
||||||
|
|
||||||
fullPlayers.RemoveAt(0);
|
fullPlayers.RemoveAt(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user