ProjectCow.Spaceship.MoveLeft C# (CSharp) Method

MoveLeft() public method

public MoveLeft ( ) : void
return void
        public void MoveLeft()
        {
            if (position.X >= LeftBoundary)
                position.X -= Speed;
        }

Usage Example

Exemplo n.º 1
0
        public void LeftBoundaryTest()
        {
            Spaceship spaceship = new Spaceship();
            spaceship.LeftBoundary = 0;
            spaceship.MoveLeft();

            Assert.AreEqual(-spaceship.Speed, spaceship.X);
        }
All Usage Examples Of ProjectCow.Spaceship::MoveLeft