add GameType.game_type which stores player and wall types, add GameUpdate.update function which takes a game type and returns a new game type, and refactor player/wall files, and gl-draw file, in light of these changes

This commit is contained in:
2024-12-15 09:10:19 +00:00
parent 1017bf1b7a
commit cc7f30f718
8 changed files with 165 additions and 88 deletions

10
fcore/game-update.sml Normal file
View File

@@ -0,0 +1,10 @@
structure GameUpdate =
struct
fun update (game, input) =
let
val {player, walls, wallTree} = game
val player = Player.move (game, input)
in
{player = player, walls = walls, wallTree = wallTree}
end
end