パッケージ org.aiwolf.server
クラス GameData
- java.lang.Object
-
- org.aiwolf.server.GameData
-
public class GameData extends java.lang.Object
Record game information of a day- 作成者:
- tori
-
-
フィールドの概要
フィールド 修飾子とタイプ フィールド 説明 protected java.util.Map<Agent,Role>
agentRoleMap
roles of each agentsprotected java.util.Map<Agent,Status>
agentStatusMap
status of each agentsprotected Agent
attacked
昨夜人狼が襲ったエージェント(成否は問わない) the agent werewolves attacked last night (no matter whether or not the attack succeeded)protected Agent
attackedDead
昨夜人狼に襲われ死亡したエージェント the agent who died last night because of the attack by werewolf.protected java.util.List<Vote>
attackVoteList
protected Agent
cursedFox
呪殺された妖狐 the fox killed by curseprotected int
day
The day of the dataprotected GameData
dayBefore
game data of one day beforeprotected Judge
divine
Result of divinationprotected Agent
executed
executed agentprotected GameSetting
gameSetting
ゲームの設定protected Guard
guard
Guardprotected java.util.List<Agent>
lastDeadAgentList
昨夜死亡したエージェントのリスト the list of agents who died last nightprotected java.util.List<Vote>
latestAttackVoteList
直近の襲撃投票リスト The latest list of votes for attack.protected java.util.List<Vote>
latestVoteList
直近の投票リスト The latest list of votes.protected java.util.Map<Agent,java.lang.Integer>
remainTalkMap
protected java.util.Map<Agent,java.lang.Integer>
remainWhisperMap
protected java.util.List<Agent>
suddendeathList
agents who sudden deathprotected int
talkIdx
protected java.util.List<Talk>
talkList
protected java.util.List<Vote>
voteList
protected java.util.List<Talk>
whisperList
protected int
wisperIdx
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 GameData(GameSetting gameSetting)
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 void
addAgent(Agent agent, Status status, Role role)
Add new agent with their rolevoid
addAttack(Vote attack)
void
addDivine(Judge divine)
Add divinevoid
addGuard(Guard guard)
void
addLastDeadAgent(Agent agent)
昨夜死亡したエージェントを追加する Adds the agent who died last night.void
addTalk(Agent agent, Talk talk)
void
addVote(Vote vote)
Add vote datavoid
addWhisper(Agent agent, Talk whisper)
boolean
contains(Agent target)
指定エージェントがゲームに含まれているかどうかを調べる Check whether the agents is joining in game.java.util.List<Agent>
getAgentList()
get agentsAgent
getAttacked()
昨夜人狼が襲ったエージェント(成否は問わない)を返す Returns the agent werewolves attacked last night (no matter whether or not the attack succeeded).Agent
getAttackedDead()
昨夜人狼に襲われ死亡したエージェントを返す. Returns the agent who died last night because of the attack by werewolf.java.util.List<Vote>
getAttackVoteList()
Agent
getCursedFox()
呪殺された妖狐を返す. Returns the fox killed by curse.int
getDay()
GameData
getDayBefore()
get game data of one day beforeJudge
getDivine()
Agent
getExecuted()
protected java.util.List<Agent>
getFilteredAgentList(java.util.List<Agent> agentList, Role role)
protected java.util.List<Agent>
getFilteredAgentList(java.util.List<Agent> agentList, Species species)
protected java.util.List<Agent>
getFilteredAgentList(java.util.List<Agent> agentList, Status status)
protected java.util.List<Agent>
getFilteredAgentList(java.util.List<Agent> agentList, Team team)
GameInfo
getFinalGameInfo(Agent agent)
get final game informationGameInfoToSend
getFinalGameInfoToSend(Agent agent)
GameInfo
getGameInfo()
get game info with all informationGameInfo
getGameInfo(Agent agent)
get specific game informationGameInfoToSend
getGameInfoToSend(Agent agent)
Guard
getGuard()
java.util.List<Agent>
getLastDeadAgentList()
java.util.List<Vote>
getLatestAttackVoteList()
直近の襲撃投票リストを返す Returns the latest list of votes for attack.java.util.List<Vote>
getLatestVoteList()
直近の投票リストを返す Returns the latest list of votes.java.util.Map<Agent,java.lang.Integer>
getRemainTalkMap()
java.util.Map<Agent,java.lang.Integer>
getRemainWhisperMap()
Role
getRole(Agent agent)
Status
getStatus(Agent agent)
get status of agentjava.util.List<Agent>
getSuddendeathList()
java.util.List<Talk>
getTalkList()
java.util.List<Vote>
getVoteList()
java.util.List<Talk>
getWhisperList()
GameData
nextDay()
Create GameData of next dayint
nextTalkIdx()
int
nextWhisperIdx()
void
setAttackedDead(Agent attackedDead)
昨夜人狼に襲われ死亡したエージェントをセットする. Sets the agent who died last night because of the attack by werewolf.void
setAttackedTarget(Agent attacked)
void
setCursedFox(Agent cursedFox)
呪殺された妖狐をセットする. Sets the fox killed by curse.void
setExecutedTarget(Agent executed)
set executedvoid
setLatestAttackVoteList(java.util.List<Vote> latestAttackVoteList)
直近の襲撃投票リストをセットする Sets the latest list of votes for attack.void
setLatestVoteList(java.util.List<Vote> latestVoteList)
直近の投票リストをセットする Sets the latest list of votes.
-
-
-
フィールドの詳細
-
day
protected int day
The day of the data
-
talkList
protected java.util.List<Talk> talkList
-
whisperList
protected java.util.List<Talk> whisperList
-
voteList
protected java.util.List<Vote> voteList
-
latestVoteList
protected java.util.List<Vote> latestVoteList
直近の投票リストThe latest list of votes.
-
attackVoteList
protected java.util.List<Vote> attackVoteList
-
latestAttackVoteList
protected java.util.List<Vote> latestAttackVoteList
直近の襲撃投票リストThe latest list of votes for attack.
-
remainTalkMap
protected java.util.Map<Agent,java.lang.Integer> remainTalkMap
-
remainWhisperMap
protected java.util.Map<Agent,java.lang.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 java.util.List<Agent> lastDeadAgentList
昨夜死亡したエージェントのリストthe list of agents who died last night
-
suddendeathList
protected java.util.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
ゲームの設定
-
-
コンストラクタの詳細
-
GameData
public GameData(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 java.util.List<Agent> getAgentList()
get agents- 戻り値:
-
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 java.util.List<Vote> getVoteList()
-
setExecutedTarget
public void setExecutedTarget(Agent executed)
set executed- パラメータ:
target
-
-
setAttackedTarget
public void setAttackedTarget(Agent attacked)
- パラメータ:
attacked
-
-
getAttackVoteList
public java.util.List<Vote> getAttackVoteList()
- 戻り値:
-
getGuard
public Guard getGuard()
- 戻り値:
-
getDay
public int getDay()
- 戻り値:
- day
-
getTalkList
public java.util.List<Talk> getTalkList()
- 戻り値:
- talkList
-
getWhisperList
public java.util.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 java.util.List<Agent> getLastDeadAgentList()
- 戻り値:
- 昨夜死亡したエージェントのリストthe list of agents who died last night
-
getSuddendeathList
public java.util.List<Agent> getSuddendeathList()
- 戻り値:
- suddendeathList
-
getRemainTalkMap
public java.util.Map<Agent,java.lang.Integer> getRemainTalkMap()
- 戻り値:
- remainTalkMap
-
getRemainWhisperMap
public java.util.Map<Agent,java.lang.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 java.util.List<Agent> getFilteredAgentList(java.util.List<Agent> agentList, Species species)
-
getFilteredAgentList
protected java.util.List<Agent> getFilteredAgentList(java.util.List<Agent> agentList, Status status)
-
getFilteredAgentList
protected java.util.List<Agent> getFilteredAgentList(java.util.List<Agent> agentList, Role role)
-
getFilteredAgentList
protected java.util.List<Agent> getFilteredAgentList(java.util.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 java.util.List<Vote> getLatestVoteList()
直近の投票リストを返すReturns the latest list of votes.- 戻り値:
- 投票リストを表す
List<Vote>
List<Vote>
representing the list of votes.
-
setLatestVoteList
public void setLatestVoteList(java.util.List<Vote> latestVoteList)
直近の投票リストをセットするSets the latest list of votes.- パラメータ:
latestVoteList
-投票リストを表すList<Vote>
List<Vote>
representing the list of votes.
-
getLatestAttackVoteList
public java.util.List<Vote> getLatestAttackVoteList()
直近の襲撃投票リストを返すReturns the latest list of votes for attack.- 戻り値:
- 投票リストを表す
List<Vote>
List<Vote>
representing the list of votes.
-
setLatestAttackVoteList
public void setLatestAttackVoteList(java.util.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.
-
-