17 setObjectType(kIncidentalUnit);
23 GLdouble xx, yy, zz, rad;
26 drawTriangle(xx, yy, zz, rad);
34 setObjectType(kWorldObject);
39 printf(
"%s got reward %3.2f!!\n",
GetName(), amount);
55 static int nextTarget = 0;
66 from = aMap->GetNodeFromMap(x, y);
69 to = aMap->GetNodeFromMap(tox, toy);
73 pathCost = aMap->distance(p);
81 GLdouble xx, yy, zz, rad;
83 int posx = x, posy = y;
86 glBegin(GL_LINE_STRIP);
87 glVertex3f(xx, yy+rad/2, zz);
88 for (
int t =
moves.size()-1; t >= 0; t--)
95 glVertex3f(xx, yy+rad/2, zz);
101 drawSphere(xx, yy, zz, rad);
112 if ((p == NULL) || (p->
next == NULL))
127 case -1: result =
kE;
break;
129 case 1: result =
kW;
break;
131 printf(
"SU: %s : The (x) nodes in the path are not next to each other!\n",
133 printf(
"Distance is %ld\n",
135 std::cout << *p->
n <<
"\n" << *p->
next->
n <<
"\n";
143 case -1: result = result|
kS;
break;
145 case 1: result = result|
kN;
break;
147 printf(
"SU: %s : The (y) nodes in the path are not next to each other!\n",
149 printf(
"Distance is %ld\n",
151 std::cout << *p->
n <<
"\n" << *p->
next->
n <<
"\n";