[Home]TRACK CLASS

Robo Home | Changes | Preferences | AllPages

package SuperMan?; import robocode.*;

public class Track {

	public String Name;     				//µÐÈË̹¿ËµÄÃû³Æ
	public double Heading;					//µÐÈ˵ľø¶Ô½Ç¶È£¬Í¨¹ý¼ÆËãµÃ³ö
	public double Bearing;					//µÐÈË̹¿ËÏà¶ÔÓÚÄ㳵ͷ·½ÏòµÄÏà¶Ô½Ç¶È
	public double Distance;					//µÐÈË̹¿ËµÄ¾àÀë
	public double Energy;					//ÄÜÁ¿
	public double Velocity;					//ËÙÂÊ
	public double FaceHeading?;				//µÐÈË̹¿ËÃæÏò?µÄ·½Ïò
	public double trackX,trackY;			//µÐÈË̹¿ËµÄ×ø±ê
	public double nextTrackX?,nextTrackY?; 	//ÏÂÒ»¸ö±ê׼ʱ¼äÖеÐÈË̹¿ËËùÔÚ?µÄλÖÃ

	public void update(ScannedRobotEvent e)
	{
		Name=e.getName();			//µÐÈË̹¿ËµÄÃû³Æ
		Bearing=e.getBearing();		//µÐÈË̹¿ËÏà¶ÔÓÚÄ㳵ͷ·½ÏòµÄÏà¶Ô½Ç¶È
		Distance=e.getDistance();	//µÐÈË̹¿ËµÄ¾àÀë
		Energy=e.getEnergy();		//ÄÜÁ¿
		Velocity=e.getVelocity();	//ËÙÂÊ
		FaceHeading?=e.getHeading();	//µÐÈË̹¿ËÃæÏò?µÄ·½Ïò	
	}

}


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited June 5, 2008 12:52 EST by DAYDream (diff)
Search: