public static Ball GetBallForTestingPurposes(Rectangle ball, Rectangle screen, Paddle paddle, bool isUp, bool isRight) { Ball toReturn = new Ball(ball.Width, screen.Width, screen.Height, paddle) { BoundingBox = ball, _velocity = new Vector2(isRight ? 1 : -1, isUp ? 1 : -1) }; return(toReturn); }
/// <summary> /// handles the score increase event /// </summary> protected virtual void OnScoreUp(Paddle p) { scoreUp?.Invoke(p); }