Mercurial > hg > Database > Alice
changeset 278:04c769f00be1
Follow coding rules.
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 18 Oct 2013 01:57:43 +0900 |
parents | ba4eea27d70d |
children | 2e1d9854a6d6 |
files | src/alice/test/topology/aquarium/AutoIncrement.java |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/test/topology/aquarium/AutoIncrement.java Fri Oct 18 01:55:21 2013 +0900 +++ b/src/alice/test/topology/aquarium/AutoIncrement.java Fri Oct 18 01:57:43 2013 +0900 @@ -10,26 +10,26 @@ private Receiver number = ids.create(CommandType.PEEK); private static final float MIN = -1.3f; - public AutoIncrement(String key,int index){ + public AutoIncrement(String key, int index) { this.number.setKey("maxsize"); this.position.setKey(key, index); } @Override public void run() { - float max = this.number.asInteger()*2-1+0.3f; + float max = this.number.asInteger() * 2 - 1 + 0.3f; FishPoint fp = this.position.asClass(FishPoint.class); - if (fp.getX()+0.01>max){ + if (fp.getX() + 0.01 > max) { fp.setXYZ(MIN, fp.getY(), fp.getZ()); - } else if (fp.getX() + 0.01 < MIN){ + } else if (fp.getX() + 0.01 < MIN) { fp.setXYZ(max, fp.getY(), fp.getZ()); } else { - fp.setXYZ(fp.getX()+0.01f, fp.getY(), fp.getZ()); + fp.setXYZ(fp.getX() + 0.01f, fp.getY(), fp.getZ()); } ods.update(position.key, fp); - synchronized(this){ + synchronized (this) { try { // TODO // Waiting should be done in Alice kernel