[Home]History of Starrynte/Smash

Robo Home | Changes | Preferences | AllPages


Revision 8 . . July 28, 2007 18:35 EST by Starrynte [update]
Revision 7 . . July 27, 2007 19:00 EST by Starrynte [Updating code]
  

Difference (from prior major revision) (no other diffs)

Changed: 81c81
double y=myY + Math.cos(e.getBearingRadians?()+myHeading)*e.getDistance();
double y=myY + Math.cos(e.getBearingRadians?()+myHeading)*e.getDistance();

Added: 227a228
out.println("
");

Changed: 248c249
return myGunHeat!=getGunHeat() || myX!=getX() || myY!=getY();
return time != getTime();

Changed: 551c552
Iterator di=dbulletl.iterator();
i=dbulletl.iterator();

Changed: 611,612c612,641
double x=en.location.getX()+en.velocity*timeDelta*Math.sin(en.heading);
double y=en.location.getY()+en.velocity*timeDelta*Math.cos(en.heading);
double x=en.location.getX() + (en.velocity*timeDelta*Math.sin(en.heading));
double y=en.location.getY() + (en.velocity*timeDelta*Math.cos(en.heading));

Line2D.Double diff=new Line2D.Double(en.location,new Point2D.Double(x,y));


int TRACE_DEPTH = 16;
Point2D middle;
boolean containsFirst;

if ((containsFirst = field.contains(diff.getP1())) == field.contains(diff.getP2())){
}

for (int i = 0; i < TRACE_DEPTH; i++) {
middle = new Point2D.Double((diff.getX1() + diff.getX2()) / 2, (diff.getY1() + diff.getY2()) / 2);

if (containsFirst != field.contains(middle)){
diff = new Line2D.Double(diff.getP1(), middle);
}else{
diff = new Line2D.Double(middle, diff.getP2());
}
}
x=(diff.getX1() + diff.getX2()) / 2;
y=(diff.getY1() + diff.getY2()) / 2;



if(Math.abs(x)>1000){ out.println(en.name + " X WRONG: timeDelta=" + timeDelta + " velocity=" + en.velocity + " heading=" + en.heading + " orig x=" + en.location.getX()); }
if(Math.abs(y)>1000){ out.println(en.name + " Y WRONG: timeDelta=" + timeDelta + " velocity=" + en.velocity + " heading=" + en.heading + " orig y=" + en.location.getY()); }


Changed: 654c683
The code for Smash is above. I need help! (sorry if the code is messy, i commented alot of things out because they don't work (yet) like the MeleePatternMatcher
The code for Smash is above. I need help! (sorry the code is messy, i commented alot of things out because they don't work (yet) like the MeleePatternMatcher

Robo Home | Changes | Preferences | AllPages
Search: