Publish VCC Plus OSS source distribution for 3.6.2 build 60
This commit is contained in:
commit
c652a5276d
1192 files changed
+272368
No files matched your search
@@ -0,0 +1,22 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
/* Three rooms in a straight corridor. Link astar. */
|
||||
#include <astar.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
AStarNode rooms[3];
|
||||
AStarGraph map = { rooms, 3, 1 };
|
||||
AStarPathIterator it;
|
||||
AStarNode *room;
|
||||
byte i;
|
||||
for (i = 0; i < 3; ++i)
|
||||
astar_initNode(rooms + i, NULL, i < 2, FALSE);
|
||||
if (!astar_searchGrid(&map, 0, 0, 2, 0))
|
||||
return 1;
|
||||
astar_startPathIteration(&it, &map, 2, 0);
|
||||
printf("BACK FROM GOAL:");
|
||||
while ((room = astar_advancePathIteration(&it)) != NULL)
|
||||
printf(" %u", (unsigned) (room - rooms));
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user