diff --git a/demos/01-demo.lisp b/demos/01-demo.lisp index dec9948..8fb6406 100644 --- a/demos/01-demo.lisp +++ b/demos/01-demo.lisp @@ -184,19 +184,16 @@ (clog:shutdown) (uiop:quit))) -(defun start-demo (&key (host "0.0.0.0") (port 8080) (start-browser t) clogframe app) +(defun start-demo (&key (host "0.0.0.0") (port *clog-port*) (start-browser t) clogframe app) "Start demo. If app is t, runs one game and shutsdown." - (when (eql port 0) - (setf port (clog-connection:random-port))) (initialize 'on-new-window :host host :port port) (when app (setf *app-mode* app)) (when clogframe (uiop:run-program (list "./clogframe" "CLOG Snake" - (format nil "~A" port) - (format nil "~A" 640) (format nil "~A" 420)))) + (format nil "~A" *clog-port*) + "640" "420"))) (when start-browser - (format t "If browser does not start go to http://127.0.0.1:~A" port) - (open-browser :url (format nil "http://127.0.0.1:~A" port)))) + (open-browser)))