MoveRight() public method

public MoveRight ( ) : void
return void
Esempio n. 1
0
        public void MoveRightTest()
        {
            Spaceship spaceship = new Spaceship();
            spaceship.X = 0;

            spaceship.MoveRight();

            Assert.AreEqual(0 + spaceship.Speed, spaceship.X);
        }
Esempio n. 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);
        }