示例#1
0
 public void connectToGame(int gameIndex, GameEventListener gameListener)
     throws RemoteException, GameNotFoundException, InvalidSessionException, InvalidTimeException,
         NotCurrentPlayerGameException, AlreadyInGameException {
   final GameInfo info = mCurrentGameListModel.getGameAt(gameIndex);
   final Session session = usrMgr.getSession();
   final Game game = srvAdapter.playGame(session, info);
   mGameEngine = new GameEngine(game, session, srvAdapter, gameListener);
   cltAdapter.setCallback(mGameEngine);
 }
示例#2
0
 public void joinGame(int gameIndex)
     throws RemoteException, FullGameException, GameNotFoundException, InvalidSessionException,
         AlreadyInGameException {
   final GameInfo info = mOpenGameListModel.getGameAt(gameIndex);
   srvAdapter.joinGame(usrMgr.getSession(), info);
 }