Mercurial > hg > Database > jungle-sharp
diff src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapDelete.cs @ 0:dec15de2c6ff
first commit
author | Kazuma |
---|---|
date | Tue, 21 Jun 2016 17:11:12 +0900 |
parents | |
children | 5c58219da97e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapDelete.cs Tue Jun 21 17:11:12 2016 +0900 @@ -0,0 +1,33 @@ +using UnityEngine; +using System.Collections; + +public class TreeMapDelete : MonoBehaviour { + + // Use this for initialization + void Start () { + TreeMap<int,int> map = new TreeMap<int, int> (); + for (int count = 1; count < 5; count++) { + map = map.put (count, count); + map.checkDepth (); + } + + ArrayList list = new ArrayList (); + for (int i = 1; i < 5; i++) { + list.Add (i); + } + + for (int i = 1; i < 5; i++) { + int ran = Random.Range (1, 6); + object obj = list [i]; + list [i] = list [ran]; + list [ran] = obj; + } + + foreach(int num in list){ + Debug.Log (num); + map = map.delete(num); + map.checkDepth(); + } + Debug.Log ("end"); + } +}