[gee-cvs] gabel/src/net/sf/gabel/forager/events ClientPositionUpdateEvent.java, 1.18, 1.19
Status: Alpha
Brought to you by:
alllee
|
From: Allen L. <al...@us...> - 2006-08-14 20:35:24
|
Update of /cvsroot/gabel/gabel/src/net/sf/gabel/forager/events In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv12520/src/net/sf/gabel/forager/events Modified Files: ClientPositionUpdateEvent.java Log Message: adding directions to legacy bunnified forager experiment Index: ClientPositionUpdateEvent.java =================================================================== RCS file: /cvsroot/gabel/gabel/src/net/sf/gabel/forager/events/ClientPositionUpdateEvent.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ClientPositionUpdateEvent.java 19 Jun 2006 23:53:06 -0000 1.18 --- ClientPositionUpdateEvent.java 14 Aug 2006 20:35:22 -0000 1.19 *************** *** 6,9 **** --- 6,10 ---- import java.util.Set; + import net.sf.gabel.forager.Direction; import net.sf.gabel.util.Identifier; *************** *** 31,48 **** private final Set<Point> foodPositions; private final boolean foodEaten; ! // private int numberOfBytes; public ClientPositionUpdateEvent(Identifier clientId, Map<Identifier, Point> positions) { ! this(clientId, false, positions); ! } ! ! public ClientPositionUpdateEvent(Identifier clientId, boolean foodEaten, Map<Identifier, Point> positions) { ! this(clientId, foodEaten, positions, null); } ! public ClientPositionUpdateEvent(Identifier clientId, boolean foodEaten, Map<Identifier, Point> positions, Set<Point> foodPositions) { super(clientId); this.foodEaten = foodEaten; this.clientPositions = positions; --- 32,47 ---- private final Set<Point> foodPositions; private final boolean foodEaten; ! ! private final Direction direction; // private int numberOfBytes; public ClientPositionUpdateEvent(Identifier clientId, Map<Identifier, Point> positions) { ! this(clientId, null, false, positions, null); } ! public ClientPositionUpdateEvent(Identifier clientId, Direction direction, boolean foodEaten, Map<Identifier, Point> positions, Set<Point> foodPositions) { super(clientId); + this.direction = direction; this.foodEaten = foodEaten; this.clientPositions = positions; *************** *** 79,82 **** --- 78,85 ---- return clientPositions.get(id); } + + public Direction getDirection() { + return direction; + } *************** *** 88,91 **** --- 91,97 ---- /** * $Log$ + * Revision 1.19 2006/08/14 20:35:22 alllee + * adding directions to legacy bunnified forager experiment + * * Revision 1.18 2006/06/19 23:53:06 alllee * forager client no longer uses EventChannel singleton instance but instead has an EventChannel per client. This way the EventChannel won't be shared across a single browser's VM running multiple applets. |