MoveRight() публичный Метод

public MoveRight ( ) : void
Результат void
Пример #1
0
        public void MoveRightTest()
        {
            Spaceship spaceship = new Spaceship();
            spaceship.X = 0;

            spaceship.MoveRight();

            Assert.AreEqual(0 + spaceship.Speed, spaceship.X);
        }
Пример #2
0
        public void RightBoundaryTest()
        {
            Spaceship spaceship = new Spaceship();
            spaceship.X = 300 - spaceship.Width;
            spaceship.RightBoundary = 300;
            spaceship.MoveRight();

            Assert.AreEqual(300 - spaceship.Width, spaceship.X);
        }