yaz/commit
handling of waiting games
author | Michiel Hildebrand |
---|---|
Wed Feb 9 17:42:24 2011 +0100 | |
committer | Michiel Hildebrand |
Wed Feb 9 17:42:24 2011 +0100 | |
commit | 9d30a1c87e1d3ff5e1a7a26b15c5cad4fe754ee7 |
tree | edb57586f3b0f3d34c1207bff5f985019eaeb881 |
parent | aaaea3d6d51346a744e16067f8686806be42f32e |
Diff style: patch stat
diff --git a/applications/yaz_game.pl b/applications/yaz_game.pl index 43897aa..492d7a1 100644 --- a/applications/yaz_game.pl +++ b/applications/yaz_game.pl @@ -205,6 +205,7 @@ html_waiting_count(N) --> !, waiting_game(URL, Game, Players) :- rdf(Game, opmv:used, URL), + rdf(Game, rdf:type, pprime:'Game'), \+ rdf(Game, opmv:wasStartedAt, _), !, findall(P, active_player(Game, P, _, _), Players). diff --git a/applications/yaz_new_user.pl b/applications/yaz_new_user.pl index e00ecae..0b8259f 100644 --- a/applications/yaz_new_user.pl +++ b/applications/yaz_new_user.pl @@ -75,8 +75,8 @@ http_yaz_admin(Request) :- descritpion('Id of game to start')]) ]), start_game(Game), - G = game(Game, Video, Time, Players), - findall(G, waiting_game(Game, Video, Time, Players), Games), + GameObj = game(G, Video, Time, Players), + findall(GameObj, waiting_game(G, Video, Time, Players), Games), reply_html_page(yaz, [ title(['YAZ - game admin']) ], @@ -86,6 +86,7 @@ http_yaz_admin(Request) :- start_game(G) :- nonvar(G), + !, start_user_process(G). start_game(_G). @@ -130,6 +131,6 @@ waiting_game(Game, Video, Time, Players) :- ; Time = 0 ), findall(p(P,N,S), active_player(Game, P, N, S), Players), - \+ Players == []. + Players = [_|_].