implement EnemyMap functor (todo: migrate from 'enemy vector' type to 'EnemyMap.t' type)
This commit is contained in:
13
fcore/enemy/enemy-map.sml
Normal file
13
fcore/enemy/enemy-map.sml
Normal 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)
|
||||||
2
oms.mlb
2
oms.mlb
@@ -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
|
||||||
|
|||||||
Submodule vendored/brolib-sml updated: d23396f5d1...f3cc41e9a2
Reference in New Issue
Block a user