Ejemplo n.º 1
0
        public void CurrentStartingNotes_Tolerance_OutOfBounds()
        {
            //1 note at 5:0
            var guitar = new GtSceneGuitar(new Double_GtTickDataTable_1Note(), 30);

            var position = new BeatTick(5, 0);

            guitar.ForceCurrentPosition(position.AddTicks(GtSceneGuitar.PLAYER_TOLERANCE_IN_TICKS + 1));
            Assert.AreEqual(0, guitar.CurrentStartingNotes.Count);

            guitar.ForceCurrentPosition(position.SubTicks(GtSceneGuitar.PLAYER_TOLERANCE_IN_TICKS + 1));
            Assert.AreEqual(0, guitar.CurrentStartingNotes.Count);
        }
Ejemplo n.º 2
0
        public void CurrentExpectedPlayingNotes_Tolerance_InBounds()
        {
            //1 note at 5:0
            var guitar = new GtSceneGuitar(new Double_GtTickDataTable_1Note(), 30);

            var position = new BeatTick(5, 0);

            guitar.ForceCurrentPosition(position.SubTicks(GtSceneGuitar.PLAYER_TOLERANCE_IN_TICKS));
            Assert.AreEqual(1, guitar.CurrentStartingNotes.Count);

            //the note at (5:0) has 8 beats of duration.
            guitar.ForceCurrentPosition(position.AddTicks((8 * 480) + GtSceneGuitar.PLAYER_TOLERANCE_IN_TICKS));
            Assert.AreEqual(1, guitar.CurrentExpectedPlayingNotes.Count);
        }
Ejemplo n.º 3
0
        public void SubTicks(int pTicks)
        {
            var a = new BeatTick(10, 479);

            Assert.AreEqual(a.AddTicks(-pTicks), a.SubTicks(pTicks));
        }