コード例 #1
0
ファイル: KogSeerPlayer.java プロジェクト: ry0u/jinrou-aiwolf
  @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);
        }
      }
    }
  }
コード例 #2
0
ファイル: IPASeer.java プロジェクト: kajiwara009/Sources
  @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++;
    }
  }