// Pseudo code of battle scheduling in Pokepon

ServerConnection conn1, conn2;
PokeponClient client1, client2;
PokeponClientCommunicationsExecutor clcomm1, clcomm2;
PokeponServer server;
PokeponCommandsExecutor srvcomm1, srvcomm2;


client1: "/battle P2Name" -> srvcomm1;

srvcomm1: "!selectteam format1 format2 ..." -> clcomm1;

clcomm1 calls client1.showTeamChoiceDialog(Set formats);

clcomm1: "!ok ChosenFormat" -> srvcomm1;

srvcomm1 calls server.scheduleBattle(conn1, conn2, chosenFormat);

server calls srvcomm2.sendMsg;

srvcomm2: "!btlreq P1Name" -> clcomm2;

clcomm2 calls client2.showConfirmDialog();

clcomm2: "/acceptbtl P2Name" -> srvcomm2;

srvcomm2: "!selectteam @ChosenFormat ..." -> clcomm2;

clcomm2 calls client2.showTeamChoiceDialog(String format);

clcomm2: "!ok" -> srvcommr2;


