パッケージ org.aiwolf.common.net
クラス GameSetting
java.lang.Object
org.aiwolf.common.net.GameSetting
- すべての実装されたインタフェース:
Cloneable
ゲームの設定です。
Settings of game.
- 作成者:
- tori and otsuki
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明clone()
ゲーム設定の複製を作成し、返します。static GameSetting
getCustomGame
(String fileName, int agentNum) ファイルから設定を読み込んで返します Returns game setting read from configuration file.static GameSetting
getDefaultGame
(int agentNum) 通常のゲーム設定を返します。int
最大再襲撃投票回数を返します。int
最大再投票回数を返します。int
連続Skipの最大許容長。int
1日あたりの発言の最大数を返します。int
1日あたりの発言ターンの最大数を返します。int
1日あたりの囁きの最大数を返します。int
1日あたりの囁きターンの最大数を返します。int
プレイヤーの人数を返します。long
ランダムシードを返します。int
getRoleNum
(Role role) 指定された役職の人数を返します。役職に対する人数を関連付けたマップを返します。static GameSetting
推奨されていません。int
リクエスト応答時間の上限を返す. Returns the time limit for the response to the request.boolean
誰も襲撃しないのを許されているかどうかを返します。boolean
同票数の場合に追放なしとするかどうかを返します。boolean
boolean
Day 0にtalkがあるかどうかを返します。boolean
発話文字列の違反チェックを行うかどうかを返します。boolean
初日の投票ができるかどうかを返します。boolean
誰が誰に投票したかをエージェントが確認できるかを返します。boolean
再襲撃投票前にwhisperするかどうかを返します。void
setEnableNoAttack
(boolean isEnableNoAttack) 誰も襲撃しないのを許すかどうかを設定します。void
setEnableNoExecution
(boolean isEnableNoExecution) 同票数の場合に追放なしとするかどうかをセットします。void
setEnableRoleRequest
(boolean isEnable) void
setMaxAttackRevote
(int maxAttackRevote) 最大再襲撃投票回数をセットします。void
setMaxRevote
(int maxRevote) 最大再投票回数をセットします。void
setMaxSkip
(int maxSkip) 連続Skipの最大許容長をセットする Sets the maximum permissible length of the succession of Skips.void
setMaxTalk
(int maxTalk) 1日あたりの発言の最大数を設定します。void
setMaxTalkTurn
(int maxTalkTurn) 1日あたりの発言ターンの最大数をセットする Sets the maximum number of turns of talk.void
setMaxWhisper
(int maxWhisper) 1日あたりの囁きの最大数を設定します。void
setMaxWhisperTurn
(int maxWhisperTurn) 1日あたりの囁きターンの最大数をセットする Sets the maximum number of turns of whisper.void
setRandomSeed
(long randomSeed) ランダムシードを設定します。void
setRoleNumMap
(Map<Role, Integer> roleNumMap) 役職に対する人数を関連付けたマップを設定します。void
setTalkOnFirstDay
(boolean isTalkOnFirstDay) Day 0にtalkがあるかどうかをセットします。void
setTimeLimit
(int timeLimit) リクエスト応答時間の上限をセットします。void
setValidateUtterance
(boolean isValidateUtterance) 発話文字列の違反チェックを行うかどうかをセットします。void
setVotableInFirstDay
(boolean isVotableInFirstDay) 初日の投票ができるかどうかをセットする Sets whether or not there is vote on first day.void
setVoteVisible
(boolean isVoteVisible) 誰が誰に投票したかをエージェントが確認できるかどうかを設定します。void
setWhisperBeforeRevote
(boolean isWhisperBeforeRevote) 再襲撃投票前にwhisperするかどうかをセットします。
-
コンストラクタの詳細
-
GameSetting
public GameSetting()新しいゲーム設定を構築します。Create new game setting.
-
-
メソッドの詳細
-
getDefaultGame
通常のゲーム設定を返します。Get the default game setting.- パラメータ:
agentNum
-ゲームに参加するエージェントの数Number of agents- 戻り値:
- 通常のゲーム設定Default game setting
-
getCustomGame
ファイルから設定を読み込んで返しますReturns game setting read from configuration file.- パラメータ:
fileName
-設定ファイルのファイル名configuration file's name- 戻り値:
- 読み込んだGameSettingGameSetting read from file
- 例外:
IOException
-
getSeminarGame
推奨されていません。セミナー用のゲーム設定を返します。Get the game setting for seminar.- 戻り値:
- セミナー用のゲーム設定Game setting for seminar
-
getRoleNum
指定された役職の人数を返します。Get the number of roles.- パラメータ:
role
-役職Role- 戻り値:
- 指定された役職の人数Number of roles
-
getMaxTalk
public int getMaxTalk()1日あたりの発言の最大数を返します。Get the max number of talks.- 戻り値:
- 1日あたりの発言の最大数Max number of talk
-
setMaxTalk
public void setMaxTalk(int maxTalk) 1日あたりの発言の最大数を設定します。Set max number of talks.- パラメータ:
maxTalk
-1日あたりの発言の最大数Max number of talks
-
getMaxTalkTurn
public int getMaxTalkTurn()1日あたりの発言ターンの最大数を返します。Get the max turn of talks.- 戻り値:
- 1日あたりの発言ターン最大数Max turn of talk
-
setMaxTalkTurn
public void setMaxTalkTurn(int maxTalkTurn) 1日あたりの発言ターンの最大数をセットするSets the maximum number of turns of talk.- パラメータ:
maxTalkTurn
-1日あたりの発言ターン最大数を表すint
int
representing the maximum number of turns of talk
-
getMaxWhisper
public int getMaxWhisper()1日あたりの囁きの最大数を返します。Get the max number of Whispers.- 戻り値:
- 1日あたりの囁きの最大数Max number of Whisper
-
setMaxWhisper
public void setMaxWhisper(int maxWhisper) 1日あたりの囁きの最大数を設定します。Sets the maximum number of whispers a day.- パラメータ:
maxWhisper
-1日あたりの囁きの最大数を表すint
int
representing the maximum number of whispers a day.
-
getMaxWhisperTurn
public int getMaxWhisperTurn()1日あたりの囁きターンの最大数を返します。Get the max turn of Whispers.- 戻り値:
- 1日あたりの囁きターン最大数Max turn of Whisper
-
setMaxWhisperTurn
public void setMaxWhisperTurn(int maxWhisperTurn) 1日あたりの囁きターンの最大数をセットするSets the maximum number of turns of whisper.- パラメータ:
maxWhisperTurn
-1日あたりの囁きターン最大数を表すint
int
representing the maximum number of turns of whisper.
-
getMaxSkip
public int getMaxSkip()連続Skipの最大許容長。これを超える数のSKIPの連続はOVERに変換されるThe maximum permissible length of the succession of Skips. The returned Skip is converted to Over if the succession is longer than this.- 戻り値:
- 最大許容長を表す
int
int
representing the maximum permissible length.
-
setMaxSkip
public void setMaxSkip(int maxSkip) 連続Skipの最大許容長をセットするSets the maximum permissible length of the succession of Skips.- パラメータ:
maxSkip
-最大許容長を表すint
int
representing the maximum permissible length.
-
isEnableNoAttack
public boolean isEnableNoAttack()誰も襲撃しないのを許されているかどうかを返します。Is the game permit to attack no one?- 戻り値:
- 誰も襲撃しないのを許されているかどうかPermission for werewolfs attack no one.
-
setEnableNoAttack
public void setEnableNoAttack(boolean isEnableNoAttack) 誰も襲撃しないのを許すかどうかを設定します。Set permission for werewolfs attack no one.- パラメータ:
isEnableNoAttack
-誰も襲撃しないのを許すかどうかPermission for werewolfs attack no one
-
isVoteVisible
public boolean isVoteVisible()誰が誰に投票したかをエージェントが確認できるかを返します。Can agents see who vote to who?- 戻り値:
- 誰が誰に投票したかをエージェントが確認できるかどうかPermission for agents see who vote to who
-
setVoteVisible
public void setVoteVisible(boolean isVoteVisible) 誰が誰に投票したかをエージェントが確認できるかどうかを設定します。Set permission for agents see who vote to who.- パラメータ:
isVoteVisible
-誰が誰に投票したかをエージェントが確認できるかどうかPermission for agents see who vote to who
-
isVotableInFirstDay
public boolean isVotableInFirstDay()初日の投票ができるかどうかを返します。Are there vote in first day?- 戻り値:
- 初日の投票ができるかどうかPermission for there vote in first day
-
setVotableInFirstDay
public void setVotableInFirstDay(boolean isVotableInFirstDay) 初日の投票ができるかどうかをセットするSets whether or not there is vote on first day.- パラメータ:
isVotableInFirstDay
-初日の投票ができるかどうかを表すboolean
boolean
representing whether or not there is vote on first day.
-
isEnableNoExecution
public boolean isEnableNoExecution()同票数の場合に追放なしとするかどうかを返します。Returns whether or not executing nobody is allowed.- 戻り値:
- 同票数の場合に追放なしとするかどうかwhether or not executing nobody is allowed
-
setEnableNoExecution
public void setEnableNoExecution(boolean isEnableNoExecution) 同票数の場合に追放なしとするかどうかをセットします。Sets whether or not executing nobody is allowed.- パラメータ:
isEnableNoExecution
-同票数の場合に追放なしとするかどうかwhether or not executing nobody is allowed
-
isTalkOnFirstDay
public boolean isTalkOnFirstDay()Day 0にtalkがあるかどうかを返します。Returns whether or not there are talks on day 0.- 戻り値:
- Day 0にtalkがあるかどうかwhether or not there are talks on day 0
-
isEnableRoleRequest
public boolean isEnableRoleRequest()- 戻り値:
-
setTalkOnFirstDay
public void setTalkOnFirstDay(boolean isTalkOnFirstDay) Day 0にtalkがあるかどうかをセットします。Sets whether or not there are talks on day 0.- パラメータ:
isTalkOnFirstDay
- -Day 0にtalkがあるかどうかwhether or not there are talks on day 0
-
isValidateUtterance
public boolean isValidateUtterance()発話文字列の違反チェックを行うかどうかを返します。Returns whether or not the text in talk/whisper is validated.- 戻り値:
- 発話文字列の違反チェックを行うかどうかwhether or not the text in talk/whisper is validated
-
setValidateUtterance
public void setValidateUtterance(boolean isValidateUtterance) 発話文字列の違反チェックを行うかどうかをセットします。Sets whether or not the text in talk/whisper is validated.- パラメータ:
isValidateUtterance
-発話文字列の違反チェックを行うかどうかwhether or not the text in talk/whisper is validated
-
isWhisperBeforeRevote
public boolean isWhisperBeforeRevote()再襲撃投票前にwhisperするかどうかを返します。Returns whether or not there is whisper before the revote for attack.*- 戻り値:
- 再襲撃投票前にwhisperするかどうかwhether or not there is whisper before the revote for attack
-
setWhisperBeforeRevote
public void setWhisperBeforeRevote(boolean isWhisperBeforeRevote) 再襲撃投票前にwhisperするかどうかをセットします。Sets whether or not there is whisper before the revote for attack.*- パラメータ:
isWhisperBeforeRevote
-再襲撃投票前にwhisperするかどうかwhether or not there is whisper before the revote for attack
-
getPlayerNum
public int getPlayerNum()プレイヤーの人数を返します。Get the number of players.- 戻り値:
- プレイヤーの人数Number of players
-
getRoleNumMap
役職に対する人数を関連付けたマップを返します。Get number of each charactors.- 戻り値:
- 役職に対する人数を関連付けたマップNumber of each charactors
-
setRoleNumMap
役職に対する人数を関連付けたマップを設定します。Set number of each charactors.- パラメータ:
roleNumMap
-役職に対する人数を関連付けたマップNumber of each charactors
-
getRandomSeed
public long getRandomSeed()ランダムシードを返します。Get the random seed.- 戻り値:
- ランダムシードRandom seed
-
setRandomSeed
public void setRandomSeed(long randomSeed) ランダムシードを設定します。Set the random seed.- パラメータ:
randomSeed
-ランダムシードRandom seed
-
getTimeLimit
public int getTimeLimit()リクエスト応答時間の上限を返す.Returns the time limit for the response to the request.- 戻り値:
- 制限時間(ms)あるいは未設定の場合-1the time limit in millisecond or -1 if this is not set yet
setTimeLimit
public void setTimeLimit(int timeLimit) リクエスト応答時間の上限をセットします。Sets the time limit for the response to the request.- パラメータ:
timeLimit
-制限時間the timeLimit to set
getMaxRevote
public int getMaxRevote()最大再投票回数を返します。Returns the maximum number of revotes.- 戻り値:
- 最大再投票回数the maximum number of revotes
setMaxRevote
public void setMaxRevote(int maxRevote) 最大再投票回数をセットします。Sets the maximum number of revotes.- パラメータ:
maxRevote
-最大再投票回数the maximum number of revotes
getMaxAttackRevote
public int getMaxAttackRevote()最大再襲撃投票回数を返します。Returns the maximum number of revotes for attack.- 戻り値:
- 最大再襲撃投票回数the maximum number of revotes for attack
setMaxAttackRevote
public void setMaxAttackRevote(int maxAttackRevote) 最大再襲撃投票回数をセットします。Sets the maximum number of revotes for attack.- パラメータ:
maxRevote
-最大再襲撃投票回数the maximum number of revotes for attack
setEnableRoleRequest
public void setEnableRoleRequest(boolean isEnable) - パラメータ:
isEnable
-
clone
ゲーム設定の複製を作成し、返します。Create copy.
-