implement code for precomputing reachable platforms so it can be reused (but haven't modified implementation of Dijkstra's algorithm to use it, and haven't added it to game type yet)
This commit is contained in:
@@ -213,3 +213,15 @@ structure DistVec =
|
||||
|
||||
fun g ({distance = a, ...}: elem, {distance = b, ...}: elem) = a > b
|
||||
end)
|
||||
|
||||
structure PlatSet =
|
||||
MakeBinVec
|
||||
(struct
|
||||
type elem = {distance: int, id: int}
|
||||
|
||||
fun l ({id = a, ...}: elem, {id = b, ...}: elem) = a < b
|
||||
|
||||
fun eq ({id = a, ...}: elem, {id = b, ...}: elem) = a = b
|
||||
|
||||
fun g ({id = a, ...}: elem, {id = b, ...}: elem) = a > b
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user