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:
10
fcore/game-update.sml
Normal file
10
fcore/game-update.sml
Normal 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
|
||||
Reference in New Issue
Block a user