+_ = require 'underscore'
 
 Reflector = require './lib/reflector'
 WebsocketServer = require './lib/websocket_server'


class Server
  constructor: (@filename, @port) ->
    Scene.load(@filename, @onLoaded)

  onLoaded: (scene) =>

    # Set an interval to send world state out to clients
    @reflector.startTicking()

new Server(_.last(process.argv), 8080)