-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloader.lgt
37 lines (32 loc) · 1 KB
/
loader.lgt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
:- if((
current_logtalk_flag(prolog_dialect, swi),
current_prolog_flag(gui, true)
)).
:- initialization((
logtalk_load_context(directory, Directory),
assertz(logtalk_library_path(snake, Directory)),
logtalk_load(snake(web_hooks)),
logtalk_load(snake(chromium_app)),
logtalk_load([ types(loader)
, random(loader)
, stripstate(loader)
, bedsit(loader)
]),
logtalk_load([ snake(board)
, snake(apple)
, snake(snake)
, snake(place)
, snake(game)
, snake(web_gui)
]),
game::start,
define_events(after, bedsit, do(_), _, game),
server::serve,
open_chromium_app,
halt
)).
:- else.
:- initialization((
write('(this example requires SWI-Prolog as the backend compiler)'), nl
)).
:- endif.