Mercurial > hg > Database > Alice
comparison src/alice/test/topology/aquarium/CheckMyName.java @ 262:ba55adb8a042
fixed bug
author | sugi |
---|---|
date | Tue, 23 Jul 2013 14:13:14 +0900 |
parents | ccce30f84380 |
children | 23e53aaa8720 |
comparison
equal
deleted
inserted
replaced
261:7e1f6b575b5a | 262:ba55adb8a042 |
---|---|
42 } | 42 } |
43 } | 43 } |
44 new CheckLocalIndex("maxsize",0); | 44 new CheckLocalIndex("maxsize",0); |
45 | 45 |
46 ods.update(key, new FishPoint(-0.1f,-0.1f)); | 46 ods.update(key, new FishPoint(-0.1f,-0.1f)); |
47 new SetLocation(new MakeObject(frame), key, 0, num); | 47 new SetLocation(new MakeObject(frame), key, 0); |
48 new CheckLocalIndex(key,1); | 48 new CheckLocalIndex(key,1); |
49 for (int i = 0; i < 3 ; i++){ | 49 for (int i = 0; i < 3 ; i++){ |
50 key = "fish"+i; | 50 key = "fish"+i; |
51 if (num == 0) new AutoIncrement(key,0); | 51 if (num == 0) new AutoIncrement(key,0); |
52 ods.update(key, new FishPoint((float)Math.random(), | 52 ods.update(key, new FishPoint((float)Math.random(), |
53 (float)Math.random(), (float)Math.random())); | 53 (float)Math.random(), (float)Math.random())); |
54 new SetLocation(new MakeObject(frame), key, 0, num); | 54 new SetLocation(new MakeObject(frame), key, 0); |
55 new CheckLocalIndex(key,1); | 55 new CheckLocalIndex(key,1); |
56 } | 56 } |
57 | 57 |
58 for (int i = 3; i < 6 ; i++){ | 58 for (int i = 3; i < 6 ; i++){ |
59 key = "fish"+i; | 59 key = "fish"+i; |
61 Random rnd = new Random(); | 61 Random rnd = new Random(); |
62 int tmp = rnd.nextInt(3); | 62 int tmp = rnd.nextInt(3); |
63 int rand = tmp + 1; | 63 int rand = tmp + 1; |
64 ods.update(key, new FishPoint( (float)rand, | 64 ods.update(key, new FishPoint( (float)rand, |
65 -(float)Math.random(), -(float)Math.random())); | 65 -(float)Math.random(), -(float)Math.random())); |
66 new SetLocation(new MakeObject(frame), key, 0, num); | 66 new SetLocation(new MakeObject(frame), key, 0); |
67 new CheckLocalIndex(key,1); | 67 new CheckLocalIndex(key,1); |
68 } | 68 } |
69 | 69 |
70 for (int i = 6; i < 9 ; i++){ | 70 for (int i = 6; i < 9 ; i++){ |
71 key = "fish"+i; | 71 key = "fish"+i; |
73 Random rnd = new Random(); | 73 Random rnd = new Random(); |
74 int tmp = rnd.nextInt(3); | 74 int tmp = rnd.nextInt(3); |
75 int rand = tmp + 3; | 75 int rand = tmp + 3; |
76 ods.update(key, new FishPoint( (float)rand, | 76 ods.update(key, new FishPoint( (float)rand, |
77 (float)Math.random(), -(float)Math.random())); | 77 (float)Math.random(), -(float)Math.random())); |
78 new SetLocation(new MakeObject(frame), key, 0, num); | 78 new SetLocation(new MakeObject(frame), key, 0); |
79 new CheckLocalIndex(key,1); | 79 new CheckLocalIndex(key,1); |
80 } | 80 } |
81 | 81 |
82 for (int i = 9; i < 12 ; i++){ | 82 for (int i = 9; i < 12 ; i++){ |
83 key = "fish"+i; | 83 key = "fish"+i; |
87 int tmp = rnd.nextInt(3); | 87 int tmp = rnd.nextInt(3); |
88 int rand = tmp + 5; | 88 int rand = tmp + 5; |
89 | 89 |
90 ods.update(key, new FishPoint( (float)rand, | 90 ods.update(key, new FishPoint( (float)rand, |
91 -(float)Math.random(), (float)Math.random())); | 91 -(float)Math.random(), (float)Math.random())); |
92 new SetLocation(new MakeObject(frame), key, 0, num); | 92 new SetLocation(new MakeObject(frame), key, 0); |
93 new CheckLocalIndex(key,1); | 93 new CheckLocalIndex(key,1); |
94 } | 94 } |
95 | 95 |
96 } | 96 } |
97 } | 97 } |