Exemple #1
0
        public void TestChangePosition()
        {
            MoveableGameObject ball       = new MoveableGameObject(testForm, 298, 414, 20, 20, true, 20, 8.161641f, 8.161641f, true, Color.Yellow);
            Rectangle          testRecOne = new Rectangle(100, 100, 20, 20);

            ball.ChangePosition(100, 100);
            Assert.AreEqual(ball.GetPosition(), testRecOne);
            ball.ChangePosition(200);
            Rectangle testRecTwo = new Rectangle(200, 100, 20, 20);

            Assert.AreEqual(ball.GetPosition(), testRecTwo);
        }
Exemple #2
0
        public void TestChangePosition()
        {
            MoveableGameObject ball       = new MoveableGameObject(298, 414, 20, 20, true, 20, 8.161641f, 8.161641f, true, System.Drawing.Brushes.Yellow);
            Rectangle          testRecOne = new Rectangle(100, 100, 20, 20);

            ball.ChangePosition(100, 100);
            Assert.AreEqual(ball.GetRecPosition(), testRecOne);
            ball.ChangePosition(200);
            Rectangle testRecTwo = new Rectangle(200, 100, 20, 20);

            Assert.AreEqual(ball.GetRecPosition(), testRecTwo);
        }