Exemplo n.º 1
0
  @Override
  public void update(GameInfo gameInfo) {
    super.update(gameInfo);

    List<Talk> talkList = gameInfo.getTalkList();

    for (int i = readTalkNum; i < talkList.size(); i++) {
      Talk talk = talkList.get(i);
      Utterance utterance = new Utterance(talk.getContent());

      if (utterance.getTopic().equals(Topic.COMINGOUT)) {
        this.comingoutRole.put(utterance.getTarget(), utterance.getRole());
        if (utterance.getRole().equals(Role.SEER)) {
          this.isAgainstSeer = true;
        }
      }

      if (utterance.getTopic().equals(Topic.DIVINED)) {
        if (!talk.getAgent().equals(this.getMe())) {
          Judge judge =
              new Judge(
                  getLatestDayGameInfo().getDay(),
                  talk.getAgent(),
                  utterance.getTarget(),
                  utterance.getResult());
          this.anotherJudgeList.add(judge);
        }
      }
    }
  }
Exemplo n.º 2
0
  @Override
  public void update(GameInfo gameInfo) {
    super.update(gameInfo);
    List<Talk> talkList = gameInfo.getTalkList();

    for (int i = readTalkNum; i < talkList.size(); i++) {
      Talk talk = talkList.get(i);
      Utterance utterance = new Utterance(talk.getContent());

      switch (utterance.getTopic()) {
        case COMINGOUT:
          if (utterance.getRole() == Role.SEER && !talk.getAgent().equals(getMe())) {
            fakeSeerCOAgent.add(utterance.getTarget());
          }
          break;
        case DIVINED:
          COResult.setDevineResult(talk.getAgent(), utterance.getTarget(), utterance.getResult());
          break;
        case AGREE:
          break;
        case ATTACK:
          break;
        case DISAGREE:
          break;
        case ESTIMATE:
          break;
        case GUARDED:
          break;
        case INQUESTED:
          COResult.setInquestResult(talk.getAgent(), utterance.getTarget(), utterance.getResult());
          break;
        case OVER:
          break;
        case SKIP:
          break;
        case VOTE:
          break;
        default:
          break;
      }
      readTalkNum++;
    }
  }