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)