public void ChacterMovingWithMovementAffectedByGravity_DeceleratesWhenClimbing() { Flight.Activate(100); Flight.TurnTowards(0, PitchHexFacing.StraightUp); Flight.MoveCharacter(100); //half because of gravity Assert.AreEqual(50, Flight.InchesMovingThisPhase); //flight is fininshed Assert.IsNull(Character.ManueverInProgess); }
public void ChacterMovingWithMovementAffectedByGravity_AcceleratesWhenDiving() { Flight.Activate(100); Flight.TurnTowards(0, PitchHexFacing.DiagonalDown); Flight.MoveCharacter(100); Assert.AreEqual(200, Flight.InchesMovingThisPhase); Assert.AreEqual(200, Flight.Velocity); //flight is fininshed Assert.IsNull(Character.ManueverInProgess); }
public void CharacterMovesAndAcceleratesOrDecelerates_AcceleratesAndDeceleratesAtFiveInchesPerHexMoved() { Flight.Activate(100); Flight.MoveCharacter(1); Assert.AreEqual(5, CharacterMovement.Velocity); Flight.MoveCharacter(18, AccelerationDirection.Accelerate); Assert.AreEqual(95, CharacterMovement.Velocity); Flight.MoveCharacter(10, AccelerationDirection.Decelerate); Assert.AreEqual(45, CharacterMovement.Velocity); }
ChacterMovingWithMovementAffectedByGravityAndAcceleratesWhenDiving_CanOnlyDecelerateAtOriginalFLightSpeed() { FlightManuever.Perform(); Flight.Facing.Pitch = PitchHexFacing.Level; //Flight.ChracterFacing = PitchHexFacing.Level; Flight.Activate(100); Flight.TurnTowards(0, PitchHexFacing.StraightDown); Flight.RaceForward(); Flight.StopMovingCharacter(); Assert.AreEqual(100, Flight.Velocity); Assert.AreEqual(FlightManuever, Character.ManueverInProgess); Flight.StopMovingCharacter(); Assert.AreEqual(null, Character.ManueverInProgess); }
public void startFlying() { Flight.Activate(100); Flight.Facing.Yaw = YawHexFacing.North; }