diff src/alice/test/topology/fishmodel/alpha/SendLocation.java @ 119:f84e1684c6be working

put NULL in CS
author sugi
date Thu, 26 Jul 2012 15:43:57 +0900
parents 9845b74063ec
children 117dad267a9b
line wrap: on
line diff
--- a/src/alice/test/topology/fishmodel/alpha/SendLocation.java	Sat Jul 21 11:22:20 2012 +0900
+++ b/src/alice/test/topology/fishmodel/alpha/SendLocation.java	Thu Jul 26 15:43:57 2012 +0900
@@ -10,6 +10,8 @@
 	public Receiver position = ids.create(CommandType.PEEK);
 	float x;
 	float y;
+	float max = 3.3f;
+	float min = -1.3f;
 	
 	public SendLocation(float x,float y){
 		this.x = x;
@@ -20,14 +22,17 @@
 	public void run() {
 		FishPoint FP = this.position.asClass(FishPoint.class);
 		
-		if (FP.getX()+this.x>9.0f){
+		FP.setXY(FP.getX()+this.x, FP.getY()+this.y);
+		/*
+		if (FP.getX()+this.x>max){
 			FP.setXY(-1.0f, FP.getY()+this.y);
-		} else if (FP.getX()+this.x< -1){
-			FP.setXY(9.0f, FP.getY()+this.y);
+		} else if (FP.getX()+this.x< min){
+			FP.setXY(max, FP.getY()+this.y);
 		}
 		else {
 			FP.setXY(FP.getX()+this.x, FP.getY()+this.y);
 		}
+		*/
 		
 		ods.update("local", "fish", FP);