derive EnemyPhysics module from functor

This commit is contained in:
2025-01-12 23:33:20 +00:00
parent 27fbe1c12e
commit ce7520ce81
3 changed files with 39 additions and 1 deletions

View File

@@ -1,4 +1,18 @@
structure EnemyPatch =
signature ENEMY_PATCH =
sig
datatype enemy_patch =
W_HEALTH of int
| W_X of int
| W_Y of int
| W_X_AXIS of GameType.x_axis
| W_Y_AXIS of GameType.y_axis
val withPatch: GameType.enemy * enemy_patch -> GameType.enemy
val withPatches: GameType.enemy * enemy_patch list -> GameType.enemy
end
structure EnemyPatch: ENEMY_PATCH =
struct
datatype enemy_patch =
W_HEALTH of int