     ###
     add_handler: (event, handler) ->
         if not @handlers[event.type]
-            @handlers[event.type]
+            @handlers[event.type] = []
 
         @handlers[event.type].push handler
+
+
+class Game.PhysicsEngine extends Game.StartStoppable
+
+    ###
+    Game physics engine. In charge of processing
+    positional updates, detecting collisions, etc.
+    ###
+
+    ###
+    Handle a tick event.
+    ###
+    on_tick: (event) =>
+        # For each room, increment the current server tick counter
+        # Once we reach the required amount of server ticks for a room
+        # tick, we reset the counter.
+        for id, room of Game.rooms
+            continue
+
 
 ###
 When a player joins a room,

Game.events = new Game.EventManager
Game.events.start()


###
Trigger a 'tick' periodically.
###
setInterval () ->
    Game.events.dispatch 'tick'
, 1000

    Constructor.
    ###
    constructor: (@id, @name) ->
        super

        @log "Creating player '#{@name}' with ID '#{@id}'"


class Game.EventManager extends Game.StartStoppable
