public void SetMemento(BallsMemento memento) { balls.Clear(); List<MBall> mBalls = memento.GetMemento(); foreach(MBall ball in mBalls) { balls.Add(new BBControl(ball.X, ball.Y, ball.Dx, ball.Dy, ball.Width, ball.Height)); } }
public void SetMemento(BallsMemento memento) { balls.Clear(); List <MBall> mBalls = memento.GetMemento(); foreach (MBall ball in mBalls) { balls.Add(new BBControl(ball.X, ball.Y, ball.Dx, ball.Dy, ball.Width, ball.Height)); } }