I had very nearly lost my first game when the opponent conveniently threw an exception. Other than that, it's a very impressive sample.
Anyway here the whole story:
System.InvalidOperationException: Nullable object must have a value.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Nullable`1.get_Value()
at Valil.Chess.XAML3D.MainWindow.ProcessStartResults(HitTestResult result) in F:\Users\Administrator\Documents\Valil.Chess.XAML3D\MainWindow.xaml.cs:line 312
at System.Windows.Media.Visual.HitTestPoint(HitTestFilter filterHitDelegate, HitTestResultDelegate resultHitDelegate, PointHitTestParameters pointParams)
at System.Windows.Media.Visual.HitTestPoint(HitTestFilter filterHitDelegate, HitTestResultDelegate resultHitDelegate, PointHitTestParameters pointParams)
at System.Windows.Media.Visual.HitTest(HitTestFilter filterHitDelegate, HitTestResultDelegate resultHitDelegate, HitTestParameters hitTestParameters)
at System.Windows.Media.VisualOperations.HitTest(Visual reference, HitTestFilter filterHitDelegate, HitTestResultDelegate resultHitDelegate, HitTestParameters hitTestParameters)
at Valil.Chess.XAML3D.MainWindow.buttonDownHandler(Object Sender, MouseButtonEventArgs e) in F:\Users\Administrator\Documents\Valil.Chess.XAML3D\MainWindow.xaml.cs:line 236
at System.Windows.UIElement.RaiseMouseButtonEvent(EventPrivateKey key, MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlers(Object source, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter)