implement EnemyMap functor (todo: migrate from 'enemy vector' type to 'EnemyMap.t' type)

This commit is contained in:
2025-02-13 12:14:50 +00:00
parent f1521acec1
commit 265c8db88a
3 changed files with 16 additions and 1 deletions

13
fcore/enemy/enemy-map.sml Normal file
View File

@@ -0,0 +1,13 @@
structure EnemyPair =
struct
type key = int
type value = EnemyType.enemy
fun l (a: int, b: int) = a < b
fun eq (a: int, b: int) = a = b
fun g (a: int, b: int) = a > b
val maxNodeSize = 8
end
structure EnemyMap = MakeGapMap (EnemyPair)

View File

@@ -1,6 +1,7 @@
$(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/basis.mlb
(* fcore *) (* fcore *)
vendored/brolib-sml/src/gap_map.sml
fcore/constants.sml fcore/constants.sml
fcore/collision.sml fcore/collision.sml
@@ -27,6 +28,7 @@ fcore/path-finding.sml
fcore/entity-type.sml fcore/entity-type.sml
fcore/enemy/enemy-type.sml fcore/enemy/enemy-type.sml
fcore/enemy/enemy-map.sml
fcore/game-type.sml fcore/game-type.sml
fcore/player-patch.sml fcore/player-patch.sml