public override void Update(GameTime gameTime) { if (_game.Queue.IsActionQueued) { var actions = _game.Queue.GetAllActions(); foreach (var act in actions.Select(x => x.Value).SelectMany(actPair => actPair)) { act?.Invoke(gameTime); } return; } if (!_game.GameOver) { if (_input.Clicked) { var wabe = _game.GameMap.AbsoluteToWabe(_input.Position); var field = wabe?.ConvertAbsolutePositionToWabeField(_input.Position, ChainReactGame.WabeSize); if (field == null) { return; } string error; _game.Set(_game.CurrentPlayer.Id, wabe, field, out error); if (error != null) { _lastMessage = error; } } } else if (_input != null && _input.Reset) { ResetGame(); } base.Update(gameTime); }