Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (base) root@gitlab:/opt/logicmoo_workspace/packs_sys/logicmoo_nlu/prolog/non_ec_planner/PaulBrownMagic/Snake# firefox http://prologpluscg.sourceforge.net/manual/index.html#SECTION00342000000000000000 &
- (base) root@gitlab:/opt/logicmoo_workspace/packs_sys/logicmoo_nlu/prolog/non_ec_planner/PaulBrownMagic/Snake# git diff
- diff --git a/chromium_app.pl b/chromium_app.pl
- index 3b3bca2..abe91a9 100644
- --- a/chromium_app.pl
- +++ b/chromium_app.pl
- @@ -1,5 +1,6 @@
- :- use_module(library(www_browser), [www_open_url/1]).
- +open_chromium_app :-!.
- open_chromium_app :-
- try_alt("chromium",
- try_alt("chromium-browser",
- diff --git a/loader.lgt b/loader.lgt
- index d87d781..98ef7a4 100644
- --- a/loader.lgt
- +++ b/loader.lgt
- @@ -7,6 +7,17 @@
- :- initialization((
- logtalk_load_context(directory, Directory),
- assertz(logtalk_library_path(snake, Directory)),
- + % redefine the "my_logtalk_libraries" library alias for the directory name and
- + % location where you will be cloning/downloading BedSit, SitCalc, and STRIPState
- + assertz(logtalk_library_path(my_logtalk_libraries, home('MyLogtalkLibs/'))),
- +
- + % assuming that the clones/downloads use the library names,
- + % no need to redefine the library aliases that follow
- + assertz(logtalk_library_path(sitcalc, my_logtalk_libraries('SitCalc/'))),
- + assertz(logtalk_library_path(stripstate, my_logtalk_libraries('STRIPState/'))),
- + assertz(logtalk_library_path(bedsit, my_logtalk_libraries('BedSit/'))),
- + assertz(logtalk_library_path(situations, my_logtalk_libraries('Situations/'))),
- +
- logtalk_load(snake(web_hooks)),
- logtalk_load(snake(chromium_app)),
- logtalk_load([ types(loader)
- @@ -25,7 +36,7 @@
- define_events(after, bedsit, do(_), _, game),
- server::serve,
- open_chromium_app,
- - halt
- + write(halt)
- )).
- :- else.
- diff --git a/static/snake.js b/static/snake.js
- index a1d4a77..718d11d 100644
- --- a/static/snake.js
- +++ b/static/snake.js
- @@ -1,6 +1,7 @@
- //const store = { snake: [], apple: {x: 0, y: 0}, gameover: true, tile_count: 32 }
- -const socket = new WebSocket('ws://localhost:8000/socket');
- +//const socket = new WebSocket('ws://localhost:8000/socket');
- +const socket = new WebSocket('ws://gitlab:8000/socket');
- socket.onopen = function (e) {
- socket.send('refresh')
- (base) root@gitlab:/opt/logicmoo_workspace/packs_sys/logicmoo_nlu/prolog/non_ec_planner/PaulBrownMagic/Snake#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement