Exemplo n.º 1
0
        public void Create(IGameConfig gameConfig)
        {
            ballManager.Clear();
            tailManager.Clear();

            var padIterator = padManager.GetEnumerator();

            for (int i = 0; i < gameConfig.Players && i < gameConfig.Mouses; ++i)
            {
                padIterator.MoveNext();

                IPad pad = padIterator.Current.Item3;
                Create(pad);
            }
        }
Exemplo n.º 2
0
        private void ReinitBall()
        {
            tailManager.Clear();

            ballManager.LeaveOnlyOne();

            IBall ball = ballManager.GetFirst();

            if (ball == null)
            {
                return;
            }

            IPad pad = padManager.GetFirst();

            SetBallStartPosition(pad, ball);
        }