Project

General

Profile

Revision 646

Added by Greg Tress about 16 years ago

Client saves homing data for move-to-point

View differences:

trunk/code/projects/colonet/client/Colonet.java
549 549
			int x = Integer.parseInt(str[i+1]);
550 550
			int y = Integer.parseInt(str[i+2]);
551 551
			RobotIcon newIcon = new RobotIcon(id, x, y);
552
			// Save previous battery value
553
			if (robotIcons.get(id) != null)
554
			    newIcon.battery = robotIcons.get(id).battery;
552
			// Save previous robot information
553
			RobotIcon oldIcon = robotIcons.get(id);
554
			if (oldIcon != null) {
555
			    newIcon.battery = oldIcon.battery;
556
				newIcon.destx = oldIcon.destx;
557
				newIcon.desty = oldIcon.desty;
558
			}
555 559
			if (newIcon.id >= 0) {
556 560
				newIcon.color = Color.GREEN;
557 561
			}

Also available in: Unified diff