Example #1
0
        /// <summary>
        /// This method is invoked whenever someone from the server performs a
        /// dump action.
        /// </summary>
        /// <param name="actionSender">The person who performed the dump action</param>
        public async void DumpActionReceivedFromServer(string actionSender)
        {
            var viewModel = GameBoardViewModel.GetInstance();

            _gameDataLogger.LogMove(actionSender, viewModel.GameTime, Storage.MoveType.Dump);

            await App.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                viewModel.TilePileCount -= 2;

                // ToDo: Get these two Tiles from the server.
                _tileManager.DumpReceived(new Tile("a"), new Tile("b"));
            });
        }