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

View File

@@ -2,6 +2,8 @@ signature QUAD_TREE =
sig
type t
val empty: t
datatype collision_side =
QUERY_ON_LEFT_SIDE
| QUERY_ON_TOP_SIDE
@@ -41,6 +43,8 @@ struct
}
| LEAF of item vector
val empty = LEAF (Vector.fromList [])
fun fromItem (itemID, startX, startY, width, height) =
let
val item = mkItem (itemID, startX, startY, width, height)