15 lines
423 B
Standard ML
15 lines
423 B
Standard ML
structure GameUpdate =
|
|
struct
|
|
open GameType
|
|
|
|
fun update (game: GameType.game_type, input, time) =
|
|
let
|
|
val {mode, userKeys, saveKeys = _} = game
|
|
in
|
|
case mode of
|
|
LEVEL level => LevelUpdate.update (level, input, userKeys, time)
|
|
| TITLE title => TitleUpdate.update (title, input, userKeys, time)
|
|
| OPTIONS options => OptionsUpdate.update (options, input, userKeys, time)
|
|
end
|
|
end
|