Пример #1
0
        private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var image = sender as Image;

            if (image.Source.ToString().Contains("Selectable"))
            {
                _startGameService.TableDominoCollection.TryAddDomino(_selectedDomino.DataContext as DominoModel,
                                                                     image.DataContext as DominoModel);

                _selectedDomino = null;
                _startGameService.TableDominoCollection.DeselectDominos();
                _aIService.StartTurn();
                RefreshAllItemSources();
            }
        }