Exemplo n.º 1
0
        public void CharacterMovesInSegmentedMode_CharacterMovesEachSegmentBasedOnTotalMovementPerTurnDividedByTwelve()
        {
            Run.Inches = 18;
            RunManuever.SegmentMovementMode = true;

            SequenceTimer watchEachSeqgmentforRunning = new SequenceTimer
                                                            (DurationUnit.Segment, 1, Sequence, Timing.Start, 6);
            int segmentWatching = 0;

            RunManuever.InchesMovingThisPhase = 18;
            int inchesPerSegment = RunManuever.InchesMovingThisPhase * Character.SPD.CurrentValue / Character.NextPhase.SegmentPartOf.Number;

            int next = 2;

            watchEachSeqgmentforRunning.TimerAction += delegate(SequenceTimer seq)
            {
                segmentWatching++;
                Assert.AreEqual(segmentWatching, Sequence.ActiveSegment.Number);
                //  Assert.AreEqual(inchesPerSegment * segmentWatching, Run.InchesMovingThisPhase - Run.InchesMovingThisPhaseNotYetUsed);

                if (segmentWatching == next)
                {
                    seq.KillTimer();
                }
            };

            watchEachSeqgmentforRunning.StartTimer();

            RunManuever.Perform();
            Run.RaceForward();
        }
Exemplo n.º 2
0
        public void CharacterMovesPastInchesLefts_CharacterOnlyMoveslAllowedAmount()
        {
            RunManuever.InchesMovingThisPhase = 3;
            RunManuever.Perform();

            Run.MoveCharacter(6);

            Assert.AreEqual(Run.InchesMovingThisPhase, 3);
        }