*******pregame******** hrac1-server: chci zalozit hru piskworky s-h1: okej, tve gameid je 1 h1-s: dej mi defaultni nastaveni s-h1: okej, mas krizky hraje se na pet viteznych na hristi 25x25 h1-s: ja chci kolecka a hriste 25x26, hrat budem na pet s-h1: okej, nastaveno hrac2-s: chci hrat hru cislo 1 s-h1: pridal se k tobe hrac2 h1-s: okej [muze rict ne, s nim nehraju] s-h2: okej, tve gameid je 1 h2-s: dej mi nastaveni s-h2: mas krizky, hraje se na pet vteznych na hristi 25x26 1) zakladatel informuje server ze chce zacit hru <iq type="set" from="jid_one" to="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="new" /> </x> </iq> 1.1) server oznamuje zalozeni hry a prirazuje ji gsid <iq type="result" to="jid_one" from="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="created" gsid="sdebdenxdednrede" /> </x> </iq> 1.2) server nemuze vytvorit dalsi hru <iq type="error" to="jid_one" from="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="new" /> </x> <error type='cancel'> <not-allowed/> </error> </iq> 2) hrac si vyzada zakladni nastaveni <iq type="get" from="jid_one" to="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="config" gsid="sdebdenxdednrede" /> </x> </iq> 2.1) server odpovi nastavenim <iq type="result" to="jid_one" from="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="config" gsid="sdebdenxdednrede" /> <config> some XML here </config> </x> </iq> 3) hrac posle sluzbe svou konfiguraci <iq type="set" from="jid_one" to="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="config" gsid="sdebdenxdednrede" /> <config> some XML here </config> </x> </iq> 3.1) server potvrzuje spravnost konfigurace <iq type="result" to="jid_one" from="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="config" gsid="sdebdenxdednrede" /> </x> </iq> 3.2) server informuje hrace o zmene nastaveni <iq type="set" to="jid_one" from="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="config" gsid="sdebdenxdednrede" /> <config> some XML here </config> </x> </iq> 3.3) hrac informuje server o tom ze je nastaveny <iq type="result" from="jid_one" to="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="config" gsid="sdebdenxdednrede" /> </x> </iq> 4) novy hrac se chce pridat ke hre <iq type="set" from="jid_two" to="game_server"> <x xmlns="http://njs.netlab.cz/game"> <game name="piskvorky" action="join" gsid="sdebdenxdednrede" /> </x> </iq>