示例#1
0
文件: Level.cs 项目: j-beatzz/WWTBAM
        public Level()
        {
            this.head = new LevelNumber(0);
            this.tail = new LevelNumber(1000000);
            this.head.Next = this.tail;
            count = 2;

            this.InsertBeforeTail(1000);
            this.InsertBeforeTail(2000);
            this.InsertBeforeTail(5000);
            this.InsertBeforeTail(10000);
            this.InsertBeforeTail(15000);
            this.InsertBeforeTail(25000);
            this.InsertBeforeTail(50000);
            this.InsertBeforeTail(75000);

            this.currentLevel = this.head;
        }
示例#2
0
文件: Level.cs 项目: j-beatzz/WWTBAM
        //Insert in between head and tail
        private void InsertBeforeTail(int amount)
        {
            LevelNumber current  = this.head;

            while(current.Next != this.tail)
            {
                current  = current.Next;

            }

            LevelNumber toInsert = new LevelNumber(amount);

            toInsert.Next = this.tail;
            current.Next = toInsert;
            this.count++;
        }
示例#3
0
 public LevelNumber(int amount)
 {
     this.amount = amount;
     this.next = null;
     this.group = 0;
 }