Exemple #1
0
 private static bool IsAssigned(Player player, InterruptSet set)
 {
     return(set.Adds.Any(a => a.Value.Interrupts.Any(i => i.Value == player)));
 }
Exemple #2
0
        private static void AssignRest(List <OrbAssignment> validChoices, InterruptAdd interruptAdd, InterruptSet set)
        {
            foreach (var assignment in validChoices)
            {
                if (IsAssigned(assignment.Player, set))
                {
                    continue;
                }

                if (interruptAdd.Interrupts[1] == null)
                {
                    interruptAdd.Interrupts[1] = assignment.Player;
                    continue;
                }
                if (interruptAdd.Interrupts[2] == null)
                {
                    interruptAdd.Interrupts[2] = assignment.Player;
                    break;
                }
            }
        }