Beispiel #1
0
        protected Stack <Character> CharacterStack; //	Stack storing all character instances.

        private void SortCharacterArray()
        {
            for (int x = 0; x < this.Characters.Length; x++)
            {
                for (int y = 0; y < (this.Characters.Length - x - 1); x++)
                {
                    if (this.Characters[x].Position.Y > this.Characters[x + 1].Position.Y)
                    {
                        GeneralTools.Swap <Character>(ref this.Characters[x], ref this.Characters[x + 1]);
                    }
                }
            }
        }