public void AreCollidingAtNear2Pi()
        {
            PlayerDot playerDot = new PlayerDot(200);

            playerDot.MoveCounterClockwise(Math.PI * 2.1);
            CircleArc circleArc = new CircleArc(0.5, Math.PI * 1.9);

            Assert.IsFalse(CollisionDetector.AreColliding(playerDot, circleArc));
        }
        public void AreNotCollidingAt0()
        {
            PlayerDot playerDot = new PlayerDot(200);

            playerDot.MoveCounterClockwise(Math.PI / 2);
            CircleArc circleArc = new CircleArc(Math.PI / 2, 0);

            Assert.IsFalse(CollisionDetector.AreColliding(playerDot, circleArc));
        }
Beispiel #3
0
        public void MoveCounterClockwisePI()
        {
            PlayerDot playerDot = new PlayerDot(200);

            playerDot.MoveCounterClockwise(Math.PI);

            Point expectedPosition = new Point(200, 400);

            Assert.AreEqual(expectedPosition, playerDot.GetPosition());
        }
Beispiel #4
0
        public void MoveCounterClockwiseGetRadian()
        {
            PlayerDot playerDot   = new PlayerDot(200);
            double    startRadian = playerDot.GetRadian();

            playerDot.MoveCounterClockwise(0.6);

            double expectedRadian = startRadian + 0.6;

            Assert.AreEqual(expectedRadian, playerDot.GetRadian());
        }