@Override public Agent divine() { List<Agent> divineCandidates = new ArrayList<Agent>(); divineCandidates.addAll( COResult.aliveGrayForMe(getLatestDayGameInfo().getAliveAgentList(), getMe())); divineCandidates.removeAll( COResult.aliveBlack(getLatestDayGameInfo().getAliveAgentList(), getMe())); for (Judge judge : getMyJudgeList()) { divineCandidates.remove(judge.getTarget()); } if (divineCandidates.size() > 0) { return randomSelect(divineCandidates); } else { divineCandidates.addAll(getLatestDayGameInfo().getAliveAgentList()); divineCandidates.removeAll( COResult.aliveBlack(getLatestDayGameInfo().getAliveAgentList(), getMe())); for (Judge judge : getMyJudgeList()) { divineCandidates.remove(judge.getTarget()); } if (divineCandidates.size() > 0) { return randomSelect(divineCandidates); } else { divineCandidates.addAll( COResult.aliveWhite(getLatestDayGameInfo().getAliveAgentList(), getMe())); for (Judge judge : getMyJudgeList()) { divineCandidates.remove(judge.getTarget()); } if (divineCandidates.size() > 0) { return randomSelect(divineCandidates); } else { for (Agent seer : COResult.getSeerCOAgent()) { divineCandidates.add(seer); } divineCandidates.remove(getMe()); for (Judge judge : getMyJudgeList()) { divineCandidates.remove(judge.getTarget()); } if (divineCandidates.size() > 0) { return randomSelect(divineCandidates); } else { return getMe(); } } } } }
@Override public Agent vote() { List<Agent> whiteAgent = new ArrayList<Agent>(); List<Agent> blackAgent = new ArrayList<Agent>(); for (Judge judge : getMyJudgeList()) { if (getLatestDayGameInfo().getAliveAgentList().contains(judge.getTarget())) { switch (judge.getResult()) { case HUMAN: whiteAgent.add(judge.getTarget()); break; case WEREWOLF: blackAgent.add(judge.getTarget()); break; } } } if (blackAgent.size() > 0) { return randomSelect(blackAgent); } else { List<Agent> voteCandidates = new ArrayList<Agent>(); if (fakeSeerCOAgent.size() > 0 && getLatestDayGameInfo().getAgentList().size() < 9) { for (Agent fake : fakeSeerCOAgent) { if (getLatestDayGameInfo().getAliveAgentList().contains(fake)) { voteCandidates.add(fake); } } } if (voteCandidates.size() > 0) { return randomSelect(voteCandidates); } else { voteCandidates.addAll( COResult.aliveGrayForMe(getLatestDayGameInfo().getAliveAgentList(), getMe())); voteCandidates.removeAll(whiteAgent); if (voteCandidates.size() > 0) { return randomSelect(voteCandidates); } else { voteCandidates.addAll(getLatestDayGameInfo().getAliveAgentList()); voteCandidates.removeAll(COResult.getSeerCOAgent()); voteCandidates.removeAll(COResult.getMediumCOAgent()); voteCandidates.removeAll(whiteAgent); if (voteCandidates.size() > 0) { return randomSelect(voteCandidates); } else { for (Agent seer : COResult.getSeerCOAgent()) { if (getLatestDayGameInfo().getAliveAgentList().contains(seer)) { voteCandidates.add(seer); } voteCandidates.remove(getMe()); } if (voteCandidates.size() > 0) { return randomSelect(voteCandidates); } else { voteCandidates.addAll(getLatestDayGameInfo().getAliveAgentList()); voteCandidates.remove(getMe()); return randomSelect(voteCandidates); } } } } } }