1
|
1 using UnityEngine;
|
|
2
|
|
3 public class TreeMapDelete : MonoBehaviour {
|
|
4
|
|
5 // Use this for initialization
|
|
6 void Start () {
|
|
7 TreeMap<int,int> map = new TreeMap<int, int> ();
|
|
8 for (int count = 1; count < 6; count++) {
|
|
9 map = map.put (count, count);
|
|
10 map.checkDepth ();
|
|
11 }
|
|
12
|
|
13 // ただ消すための数字をここに入れているだけ
|
7
|
14 List<int> list = new List<int>();
|
|
15 for (int count = 1; count < 6; count++) {
|
|
16 list = list.addLast (count);
|
1
|
17 }
|
|
18
|
|
19 foreach(int num in list){
|
7
|
20 Debug.Log(num);
|
1
|
21 map = map.delete(num);
|
|
22 map.checkDepth();
|
|
23 }
|
|
24 Debug.Log ("end");
|
|
25 }
|
|
26 }
|