예제 #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;
 }