/// <summary> /// Adds a ball to the balance /// </summary> /// <param name="ball"></param> /// <param name="leftSide"></param> public void AddBallToBalance(Ball ball, bool leftSide) { if (leftSide) { LeftBalanceBalls.Add(ball); } else { RightBalanceBalls.Add(ball); } }
public void newBall(int index, int top, int left, int weight) { Ball b = new Ball(weight.ToString(), weight); ballArray[index] = b; canvas.Children.Add(b); Canvas.SetTop(b, top); Canvas.SetLeft(b, left); }
/// <summary> /// Pushes a ball from the HeldBalls section in the assumption that it'll trigger an animation /// </summary> /// <param name="ball"></param> public void PushBall(Ball ball) { this.HeldBalls.Remove(ball); }