annotate src/alice/test/topology/movement/SendLocation.java @ 92:8e3c1217aad4 working

add KeyInput
author sugi
date Tue, 05 Jun 2012 14:31:04 +0900
parents
children 6601f8854126
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
92
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
1 package alice.test.topology.movement;
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
2
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
3 import alice.codesegment.CodeSegment;
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
4 import alice.datasegment.CommandType;
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
5 import alice.datasegment.Receiver;
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
6
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
7
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
8 public class SendLocation extends CodeSegment {
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
9
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
10 public Receiver nowX = ids.create(CommandType.PEEK);
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
11 int num;
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
12
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
13 public SendLocation(int x){
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
14 this.num = x;
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
15 }
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
16
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
17 @Override
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
18 public void run() {
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
19 ods.update("parent", "fishX3", this.nowX.asInteger()+num);
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
20
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
21 }
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
22
8e3c1217aad4 add KeyInput
sugi
parents:
diff changeset
23 }