Esempio n. 1
0
        protected virtual void Reset()
        {
            BaseCurrentMap.Reset();

            HazardMap = new int[BaseCurrentMap.Size.X, BaseCurrentMap.Size.Y];

            _basePlayerList.ForEach(basePlayer => basePlayer.Reset());
            _removedPlayers.Clear();
            _baseBombList.Clear();
            _basePowerUpList.Clear();
            _baseWallList.Clear();

            // Generate walls for another game
            GenerateRandomWalls();

            // Randomize players position
            _basePlayerList.Sort(new PlayerRandomSorter());

            // Replace players to their original spawn point
            for (int i = 0; i < _basePlayerList.Count; i++)
            {
                _basePlayerList[i].ChangePosition(BaseCurrentMap.PlayerSpawnPoints[i]);
            }
        }