/// <summary>
        /// Input helper method provided by GameScreen.  Packages up the various input
        /// values for ease of use.  Here it checks for pausing and handles controlling
        /// the player's tank.
        /// </summary>
        /// <param name="input">The state of the gamepads</param>
        public override void HandleInput(InputState input)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }

            if (input.PauseGame)
            {
                if (gameOver == true)
                {
                    finishCurrentGame();
                }
            }
            else
            {
                touchState = TouchPanel.GetState();
                bool buttonTouched = false;

                //interpret touch screen presses
                foreach (TouchLocation location in touchState)
                {
                    switch (location.State)
                    {
                    case TouchLocationState.Pressed:
                        buttonTouched = true;
                        break;

                    case TouchLocationState.Moved:
                        break;

                    case TouchLocationState.Released:
                        break;
                    }
                }

                float movement = 0.0f;
                if (accelState != null)
                {
                    if (Math.Abs(accelState.X) > 0.10f)
                    {
                        if (accelState.X > 0.0f)
                        {
                            movement = 1.0f;
                        }
                        else
                        {
                            movement = -1.0f;
                        }
                    }
                }

                player.Velocity.X = movement;

                //This section handles tank movement.  We only allow one "movement" action
                //to occur at once so that touchpad devices don't get double hits.
                KeyboardState keyState = Keyboard.GetState();

                if (input.CurrentGamePadStates[0].DPad.Left == ButtonState.Pressed || keyState.IsKeyDown(Keys.Left))
                {
                    player.Velocity.X = -1.0f;
                }
                else if (input.CurrentGamePadStates[0].DPad.Right == ButtonState.Pressed || keyState.IsKeyDown(Keys.Right))
                {
                    player.Velocity.X = 1.0f;
                }
                else
                {
                    player.Velocity.X = MathHelper.Min(input.CurrentGamePadStates[0].ThumbSticks.Left.X * 2.0f, 1.0f);
                }

                // B button, or pressing on the upper half of the pad or space on keyboard or touching the touch panel fires the weapon.
                if (input.CurrentGamePadStates[0].IsButtonDown(Buttons.B) || input.CurrentGamePadStates[0].IsButtonDown(Buttons.A) || input.CurrentGamePadStates[0].ThumbSticks.Left.Y > 0.25f ||
                    keyState.IsKeyDown(Keys.Space) || buttonTouched)
                {
                    if (!gameOver)
                    {
                        if (player.FireTimer <= 0.0f && player.IsAlive && !gameOver)
                        {
                            Bullet bullet = CreatePlayerBullet();
                            bullet.Position  = new Vector2((int)(player.Position.X + player.Width / 2) - bulletTexture.Width / 2, player.Position.Y - 4);
                            bullet.Velocity  = new Vector2(0, -256.0f);
                            player.FireTimer = 1.0f;

                            particles.CreatePlayerFireSmoke(player);
                            playerFired.Play();
                        }
                        else if (gameOver)
                        {
                            finishCurrentGame();
                        }
                    }
                    else if (gameOver)
                    {
                        finishCurrentGame();
                    }
                }
            }
        }