Пример #1
0
void initPaths2012(int index) {
	clearPathList(getNavigationPathList());

	// DIRECT PATH TO TARGETS
	if (index == STRATEGY_HOMOLOGATION) {
		#ifdef INCLUDE_HOMOLOGATION
			void startAreaToStartAreaFrontPathFunction() { fillPathData(&startAreaLocation, &startAreaFrontLocation, STARTAREA_TO_STARTAREA_FRONT_COST,  0x0A, 0x0A, START_ANGLE, ANGLE_90, STARTAREA_TO_STARTAREA_FRONT_SPEED_FACTOR, STARTAREA_TO_STARTAREA_FRONT_ACCELERATION_FACTOR); }
Пример #2
0
void printStrategyAllDatas(OutputStream* outputStream) {
    printLocationList(outputStream, "navigationLocationList:", getNavigationLocationList());
    printPathList(outputStream, "navigationPathList:", getNavigationPathList());
    printGameTargetList(outputStream);
    printGameStrategyList(outputStream);
    printGameStrategyContext(outputStream, getStrategyContext());
}
Пример #3
0
	void pathFIFunction() { fillPathData(&locationF, &locationI, 250, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathFIFunction);
	void pathIJFunction() { fillPathData(&locationI, &locationJ, 84, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathIJFunction);

	void pathACFunction() { fillPathData(&locationA, &locationC, 217, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathACFunction);
	void pathCGFunction() { fillPathData(&locationC, &locationG, 186, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathCGFunction);

	void pathCHFunction() { fillPathData(&locationC, &locationH, 103, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathCHFunction);
	void pathHDFunction() { fillPathData(&locationH, &locationD, 183, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathHDFunction);
	void pathHJFunction() { fillPathData(&locationH, &locationJ, 167, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathHJFunction);

	void pathEJFunction() { fillPathData(&locationE, &locationJ, 502, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathEJFunction);
	void pathAEFunction() { fillPathData(&locationA, &locationE, 173, 0, 0, 0, 0, 0, 0); }
	addNavigationPath(&pathAEFunction);

	printPathList(getOutputStreamLogger(INFO), "Paths definition", getNavigationPathList());

	int cost = computeBestPath(&resultLocationList, &locationA, &locationJ);

	printLocationList(getOutputStreamLogger(INFO), "Result=", &resultLocationList);

	return cost;
}