Beispiel #1
0
        private bool BounceBigBallUnusual(IBall ball)
        {
            if (XLeftInside && XRightInside && !YTopInside && !YBottomInside && YBottomOutside && YTopOutside && !XLeftOutside && !XRightOutside)
            {
                ball.BounceBigFromLeft();
                ball.BounceBigFromRight();
                return(true);
            }

            if (!XLeftInside && !XRightInside && YTopInside && YBottomInside && !YBottomOutside && !YTopOutside && XLeftOutside && XRightOutside)
            {
                ball.BounceBigFromTop();
                ball.BounceBigFromBottom();
                return(true);
            }

            if (!XLeftInside && !XRightInside && !YTopInside && !YBottomInside && YBottomOutside && YTopOutside && XLeftOutside && XRightOutside)
            {
                ball.BounceBigFromTop();
                ball.BounceBigFromBottom();
                return(true);
            }

            return(false);
        }