パッケージ org.aiwolf.server

クラス GameData

java.lang.Object
org.aiwolf.server.GameData

public class GameData extends Object
Record game information of a day
作成者:
tori
  • フィールド詳細

    • day

      protected int day
      The day of the data
    • agentStatusMap

      protected Map<Agent,Status> agentStatusMap
      status of each agents
    • agentRoleMap

      protected Map<Agent,Role> agentRoleMap
      roles of each agents
    • talkList

      protected List<Talk> talkList
    • whisperList

      protected List<Talk> whisperList
    • voteList

      protected List<Vote> voteList
    • latestVoteList

      protected List<Vote> latestVoteList
      直近の投票リスト
      The latest list of votes.
    • attackVoteList

      protected List<Vote> attackVoteList
    • latestAttackVoteList

      protected List<Vote> latestAttackVoteList
      直近の襲撃投票リスト
      The latest list of votes for attack.
    • remainTalkMap

      protected Map<Agent,Integer> remainTalkMap
    • remainWhisperMap

      protected Map<Agent,Integer> remainWhisperMap
    • divine

      protected Judge divine
      Result of divination
    • guard

      protected Guard guard
      Guard
    • executed

      protected Agent executed
      executed agent
    • attackedDead

      protected Agent attackedDead
      昨夜人狼に襲われ死亡したエージェント
      the agent who died last night because of the attack by werewolf.
    • attacked

      protected Agent attacked
      昨夜人狼が襲ったエージェント(成否は問わない)
      the agent werewolves attacked last night (no matter whether or not the attack succeeded)
    • cursedFox

      protected Agent cursedFox
      呪殺された妖狐
      the fox killed by curse
    • lastDeadAgentList

      protected List<Agent> lastDeadAgentList
      昨夜死亡したエージェントのリスト
      the list of agents who died last night
    • suddendeathList

      protected List<Agent> suddendeathList
      agents who sudden death
    • dayBefore

      protected GameData dayBefore
      game data of one day before
    • talkIdx

      protected int talkIdx
    • wisperIdx

      protected int wisperIdx
    • gameSetting

      protected GameSetting gameSetting
      ゲームの設定
  • コンストラクタの詳細

  • メソッドの詳細

    • getGameInfo

      public GameInfo getGameInfo(Agent agent)
      get specific game information
      パラメータ:
      agent -
      戻り値:
    • getFinalGameInfo

      public GameInfo getFinalGameInfo(Agent agent)
      get final game information
      パラメータ:
      agent -
      戻り値:
    • getGameInfo

      public GameInfo getGameInfo()
      get game info with all information
      戻り値:
    • getGameInfoToSend

      public GameInfoToSend getGameInfoToSend(Agent agent)
      パラメータ:
      agent - - if null, get all information
      戻り値:
    • getFinalGameInfoToSend

      public GameInfoToSend getFinalGameInfoToSend(Agent agent)
    • addAgent

      public void addAgent(Agent agent, Status status, Role role)
      Add new agent with their role
      パラメータ:
      agent -
      status -
      role -
    • getAgentList

      public List<Agent> getAgentList()
      get agents
      戻り値:
    • getStatus

      public Status getStatus(Agent agent)
      get status of agent
      パラメータ:
      agent -
    • getRole

      public Role getRole(Agent agent)
      パラメータ:
      agent -
      戻り値:
    • addTalk

      public void addTalk(Agent agent, Talk talk)
      パラメータ:
      agent -
      talk -
    • addWhisper

      public void addWhisper(Agent agent, Talk whisper)
    • addVote

      public void addVote(Vote vote)
      Add vote data
      パラメータ:
      vote -
    • addDivine

      public void addDivine(Judge divine)
      Add divine
      パラメータ:
      divine -
    • addGuard

      public void addGuard(Guard guard)
    • addAttack

      public void addAttack(Vote attack)
    • getVoteList

      public List<Vote> getVoteList()
    • setExecutedTarget

      public void setExecutedTarget(Agent executed)
      set executed
      パラメータ:
      target -
    • setAttackedTarget

      public void setAttackedTarget(Agent attacked)
      パラメータ:
      attacked -
    • getAttackVoteList

      public List<Vote> getAttackVoteList()
      戻り値:
    • getGuard

      public Guard getGuard()
      戻り値:
    • getDay

      public int getDay()
      戻り値:
      day
    • getTalkList

      public List<Talk> getTalkList()
      戻り値:
      talkList
    • getWhisperList

      public List<Talk> getWhisperList()
      戻り値:
      wisperList
    • getDivine

      public Judge getDivine()
      戻り値:
      divine
    • getExecuted

      public Agent getExecuted()
      戻り値:
      executed
    • getAttacked

      public Agent getAttacked()
      昨夜人狼が襲ったエージェント(成否は問わない)を返す
      Returns the agent werewolves attacked last night (no matter whether or not the attack succeeded).
      戻り値:
      attackedAgent -
      昨夜人狼が襲ったエージェント
      the agent werewolves attacked last night
    • addLastDeadAgent

      public void addLastDeadAgent(Agent agent)
      昨夜死亡したエージェントを追加する
      Adds the agent who died last night.
      パラメータ:
      agent -
      追加するエージェント
      the agent to be added
    • getLastDeadAgentList

      public List<Agent> getLastDeadAgentList()
      戻り値:
      昨夜死亡したエージェントのリスト
      the list of agents who died last night
    • getSuddendeathList

      public List<Agent> getSuddendeathList()
      戻り値:
      suddendeathList
    • getRemainTalkMap

      public Map<Agent,Integer> getRemainTalkMap()
      戻り値:
      remainTalkMap
    • getRemainWhisperMap

      public Map<Agent,Integer> getRemainWhisperMap()
      戻り値:
      remainTalkMap
    • nextDay

      public GameData nextDay()
      Create GameData of next day
      戻り値:
    • getDayBefore

      public GameData getDayBefore()
      get game data of one day before
      戻り値:
    • getFilteredAgentList

      protected List<Agent> getFilteredAgentList(List<Agent> agentList, Species species)
    • getFilteredAgentList

      protected List<Agent> getFilteredAgentList(List<Agent> agentList, Status status)
    • getFilteredAgentList

      protected List<Agent> getFilteredAgentList(List<Agent> agentList, Role role)
    • getFilteredAgentList

      protected List<Agent> getFilteredAgentList(List<Agent> agentList, Team team)
    • nextTalkIdx

      public int nextTalkIdx()
    • nextWhisperIdx

      public int nextWhisperIdx()
    • getAttackedDead

      public Agent getAttackedDead()
      昨夜人狼に襲われ死亡したエージェントを返す.
      Returns the agent who died last night because of the attack by werewolf.
      戻り値:
      the attackedDead
    • setAttackedDead

      public void setAttackedDead(Agent attackedDead)
      昨夜人狼に襲われ死亡したエージェントをセットする.
      Sets the agent who died last night because of the attack by werewolf.
      パラメータ:
      attackedDead - the attackedDead to set
    • getCursedFox

      public Agent getCursedFox()
      呪殺された妖狐を返す.
      Returns the fox killed by curse.
      戻り値:
      呪殺された妖狐
      the fox killed by curse
    • setCursedFox

      public void setCursedFox(Agent cursedFox)
      呪殺された妖狐をセットする.
      Sets the fox killed by curse.
      パラメータ:
      cursedFox -
      呪殺された妖狐
      the fox killed by curse
    • getLatestVoteList

      public List<Vote> getLatestVoteList()
      直近の投票リストを返す
      Returns the latest list of votes.
      戻り値:
      投票リストを表すList<Vote>
      List<Vote> representing the list of votes.
    • setLatestVoteList

      public void setLatestVoteList(List<Vote> latestVoteList)
      直近の投票リストをセットする
      Sets the latest list of votes.
      パラメータ:
      latestVoteList -
      投票リストを表すList<Vote>
      List<Vote> representing the list of votes.
    • getLatestAttackVoteList

      public List<Vote> getLatestAttackVoteList()
      直近の襲撃投票リストを返す
      Returns the latest list of votes for attack.
      戻り値:
      投票リストを表すList<Vote>
      List<Vote> representing the list of votes.
    • setLatestAttackVoteList

      public void setLatestAttackVoteList(List<Vote> latestAttackVoteList)
      直近の襲撃投票リストをセットする
      Sets the latest list of votes for attack.
      パラメータ:
      latestAttackVoteList -
      投票リストを表すList<Vote>
      List<Vote> representing the list of votes.
    • contains

      public boolean contains(Agent target)
      指定エージェントがゲームに含まれているかどうかを調べる
      Check whether the agents is joining in game.
      パラメータ:
      latestAttackVoteList -
      含まれているかどうかboolean
      boolean is contains in the game.