コード例 #1
0
 public void HasCorrectDescription()
 {
     var action = new BattleAction("attack", 1, 1);
     queueableAction = new QueueableAction("attacker", action, 7);
     Assert.That(queueableAction.Placement, Is.EqualTo(-6));
     Assert.That(queueableAction.Description, Is.EqualTo("attacker's attack"));
 }
コード例 #2
0
 public void Setup()
 {
     var action = new BattleAction("bow", 2, 7);
     action.FinishCurrentPartOfAction();
     queueableAction = new QueueableAction("attacker", action, 7);
 }
コード例 #3
0
        private IEnumerable<QueueableAction> GetOrderedActions(IEnumerable<ActionParticipant> participants)
        {
            var list = new List<QueueableAction>();

            foreach (var p in participants)
            {
                var preppedActions = p.Actions.Where(a => a.Prepped);

                foreach (var a in preppedActions)
                {
                    var queueableAction = new QueueableAction(p.Name, a, p.Initiative);
                    list.Add(queueableAction);
                }
            }

            return list.OrderBy(q => q.Placement);
        }