示例#1
0
        public void RestorePreviousState(ref Round round, ref ParticipatorsContainer container)
        {
            if (round.RoundNumber != 1)
            {
                round.RoundNumber--;

                List<List<ObjectParticipator>> tmpObjects = new List<List<ObjectParticipator>>() {
                new List<ObjectParticipator>() { ChoosedObjects.Last(), ExcludedObjects.Last() }};
                tmpObjects.AddRange(round.Pairs);

                round.Pairs = tmpObjects;

                container.RemainderOfInitialCapacity++;
                container.NextRoundObjectsArray.Remove(container.NextRoundObjectsArray.Last());
            }
            else
            {
                round = (Round)PreviousStageRound.Clone();
                container = (ParticipatorsContainer)PreviousPContainer.Clone();
            }

            ChoosedObjects.Remove(ChoosedObjects.Last());
            ExcludedObjects.Remove(ExcludedObjects.Last());

        }
示例#2
0
 public void UpdateObjectsLists(ObjectParticipator choosedObject)
 {
     ChoosedObjects.Add(choosedObject);
     ExcludedObjects.Remove(choosedObject);
 }