예제 #1
0
        public RoundViewModel(Int32 round, IEnumerable<ActionParticipant> participants)
        {
            this.round = round;
            var orderedActions = GetOrderedActions(participants);
            actions = new Queue<QueueableAction>(orderedActions);

            TotalActions = this.actions.Count;
            GetNextActionsCommand = new GetNextActionsCommand(this);

            GetActions();
        }
        public void Setup()
        {
            var name = new ActionParticipant("name");
            var otherName = new ActionParticipant("other name");
            var participants = new[] { name, otherName };

            var firstAction = new BattleAction("attack 1", 1, 1, true);
            var secondAction = new BattleAction("attack 2", 1, 1, true);

            name.AddAction(firstAction);
            otherName.AddAction(secondAction);

            name.Initiative = 2;
            otherName.Initiative = 1;

            roundViewModel = new RoundViewModel(1, participants);
            getNextActionsCommand = new GetNextActionsCommand(roundViewModel);
        }