Package net.socialgamer.cah

Examples of net.socialgamer.cah.SafeTimerTask


        logger.info(String.format("Resetting game %d due to too few players after someone left.",
            id));
        resetState(true);
      } else if (wasJudge) {
        synchronized (roundTimerLock) {
          final SafeTimerTask task = new SafeTimerTask() {
            @Override
            public void process() {
              startNextRound();
            }
          };
View Full Code Here


    data.put(LongPollResponse.PLAY_TIMER, playTimer);

    broadcastToPlayers(MessageType.GAME_EVENT, data);

    synchronized (roundTimerLock) {
      final SafeTimerTask task = new SafeTimerTask() {
        @Override
        public void process() {
          warnPlayersToPlay();
        }
      };
View Full Code Here

            player.getUser().enqueueMessage(q);
          }
        }
      }

      final SafeTimerTask task = new SafeTimerTask() {
        @Override
        public void process() {
          skipIdlePlayers();
        }
      };
View Full Code Here

        data.put(LongPollResponse.GAME_ID, this.id);
        final QueuedMessage q = new QueuedMessage(MessageType.GAME_EVENT, data);
        getJudge().getUser().enqueueMessage(q);
      }

      final SafeTimerTask task = new SafeTimerTask() {
        @Override
        public void process() {
          skipIdleJudge();
        }
      };
View Full Code Here

    broadcastToPlayers(MessageType.GAME_EVENT, data);

    notifyPlayerInfoChange(getJudge());

    synchronized (roundTimerLock) {
      final SafeTimerTask task = new SafeTimerTask() {
        @Override
        public void process() {
          warnJudgeToJudge();
        }
      };
View Full Code Here

    notifyPlayerInfoChange(getJudge());
    notifyPlayerInfoChange(cardPlayer);

    synchronized (roundTimerLock) {
      final SafeTimerTask task;
      // TODO win-by-x option
      if (cardPlayer.getScore() >= options.scoreGoal) {
        task = new SafeTimerTask() {
          @Override
          public void process() {
            winState();
          }
        };
      } else {
        task = new SafeTimerTask() {
          @Override
          public void process() {
            startNextRound();
          }
        };
View Full Code Here

TOP

Related Classes of net.socialgamer.cah.SafeTimerTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.