mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-05 18:20:36 -08:00
correct demo startup
This commit is contained in:
parent
22ffddeaf6
commit
c71228be69
1 changed files with 4 additions and 7 deletions
|
|
@ -184,19 +184,16 @@
|
||||||
(clog:shutdown)
|
(clog:shutdown)
|
||||||
(uiop:quit)))
|
(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."
|
"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)
|
(initialize 'on-new-window :host host :port port)
|
||||||
(when app
|
(when app
|
||||||
(setf *app-mode* app))
|
(setf *app-mode* app))
|
||||||
(when clogframe
|
(when clogframe
|
||||||
(uiop:run-program (list "./clogframe"
|
(uiop:run-program (list "./clogframe"
|
||||||
"CLOG Snake"
|
"CLOG Snake"
|
||||||
(format nil "~A" port)
|
(format nil "~A" *clog-port*)
|
||||||
(format nil "~A" 640) (format nil "~A" 420))))
|
"640" "420")))
|
||||||
(when start-browser
|
(when start-browser
|
||||||
(format t "If browser does not start go to http://127.0.0.1:~A" port)
|
(open-browser)))
|
||||||
(open-browser :url (format nil "http://127.0.0.1:~A" port))))
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue