private void btnPlay_Click(object sender, RoutedEventArgs e) { if (CanPlay()) { MoveRobot.Begin(); robotSound.Stop(); robotSound.Source = new System.Uri("sound26.wma", System.UriKind.Relative); System.Threading.Thread.Sleep(50); robotSound.Play(); } }
public static void testMovingMoving(RobotOrientation orientation, int expectedX, int expectedY) { int[] expectedResult = { expectedX, expectedY }; int[] actualResult = MoveRobot.GetRobotDisplacement(orientation); Assert.Equal(expectedResult, actualResult); }