ProjectCow.Spaceship.MoveRight C# (CSharp) Method

MoveRight() public method

public MoveRight ( ) : void
return void
        public void MoveRight()
        {
            if (position.X + Width < RightBoundary)
                position.X += Speed;
        }

Usage Example

Beispiel #1
0
        public void MoveRightTest()
        {
            Spaceship spaceship = new Spaceship();
            spaceship.X = 0;

            spaceship.MoveRight();

            Assert.AreEqual(0 + spaceship.Speed, spaceship.X);
        }
All Usage Examples Of ProjectCow.Spaceship::MoveRight