This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* AStarfinding | |
* | |
* local path_find = require "pathfinding" | |
* | |
* local function neighbors(add, x, y, dist) | |
* add(x+1, y, hint, 1) | |
* end | |
* | |
* local r = path_find(sx, sy, tx, ty, neighbors) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{ | |
collections::{HashMap, HashSet}, | |
fmt, | |
fmt::{Display, Formatter}, | |
hash::Hash, | |
iter::FromIterator, | |
sync::OnceLock, | |
}; | |
#[derive(Debug, Hash, Clone, Copy, Eq, PartialEq)] |
OlderNewer