パッケージ org.aiwolf.sample.lib
クラス AbstractRoleAssignPlayer
java.lang.Object
org.aiwolf.sample.lib.AbstractRoleAssignPlayer
- すべての実装されたインタフェース:
Player
- 直系の既知のサブクラス:
SampleRoleAssignPlayer
役職ごとに実際に使用するプレイヤーを切り替えるプレイヤーの抽象クラス
Abstract player class which switches player actually used according to its role.
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明final Agent
attack()
人狼によって、襲撃したいエージェントを決めます。final void
dayStart()
1日の始まりに呼び出されます。final Agent
divine()
占い師によって、占うエージェントを決めます。final void
finish()
ゲーム終了時に呼び出されます。final Player
狩人用プレイヤーを返す. Returns the player actually used in case of bodyguard.final Player
霊媒師用プレイヤーを返す. Returns the player actually used in case of medium.abstract String
getName()
プレイヤーの名前を返します。final Player
裏切り者用プレイヤーを返す. Returns the player actually used in case of possessed.final Player
占い師用プレイヤーを返す. Returns the player actually used in case of seer.final Player
村人用プレイヤーを返す. Returns the player actually used in case of villager.final Player
人狼用プレイヤーを返す. Returns the player actually used in case of werewolf.final Agent
guard()
狩人によって、護衛するエージェントを決めます。final void
initialize
(GameInfo gameInfo, GameSetting gameSetting) ゲーム開始時に呼び出されます。final void
setBodyguardPlayer
(Player bodyGuardPlayer) 狩人用プレイヤーをセットする. Sets the player actually used in case of bodyguard.final void
setMediumPlayer
(Player mediumPlayer) 霊媒師用プレイヤーをセットする. Sets the player actually used in case of medium.final void
setPossessedPlayer
(Player possesedPlayer) 裏切り者用プレイヤーをセットする. Sets the player actually used in case of possessed.final void
setSeerPlayer
(Player seerPlayer) 占い師用プレイヤーをセットする. Sets the player actually used in case of seer.final void
setVillagerPlayer
(Player villagerPlayer) 村人用プレイヤーをセットする. Sets the player actually used in case of villager.final void
setWerewolfPlayer
(Player werewolfPlayer) 人狼用プレイヤーをセットする. Sets the player actually used in case of werewolf.final String
talk()
各プレイヤーはこのメソッドに意見を返すことで会話することができます。final void
ゲームの情報が更新されたときに呼び出されます。final Agent
vote()
追放したいエージェントに投票します。final String
whisper()
各人狼はこのメソッドに意見を返すことで人狼同士での会話ができます。
-
コンストラクタの詳細
-
AbstractRoleAssignPlayer
public AbstractRoleAssignPlayer()
-
-
メソッドの詳細
-
getVillagerPlayer
村人用プレイヤーを返す.Returns the player actually used in case of villager.- 戻り値:
- 村人用プレイヤーthe player actually used in case of villager
-
setVillagerPlayer
村人用プレイヤーをセットする.Sets the player actually used in case of villager.- パラメータ:
villagerPlayer
-実際の村人プレイヤーthe actual villager player
-
getSeerPlayer
占い師用プレイヤーを返す.Returns the player actually used in case of seer.- 戻り値:
- 占い師用プレイヤーthe player actually used in case of seer
-
setSeerPlayer
占い師用プレイヤーをセットする.Sets the player actually used in case of seer.- パラメータ:
seerPlayer
-実際の占い師プレイヤーthe actual seer player
-
getMediumPlayer
霊媒師用プレイヤーを返す.Returns the player actually used in case of medium.- 戻り値:
- 霊媒師用プレイヤーthe player actually used in case of medium
-
setMediumPlayer
霊媒師用プレイヤーをセットする.Sets the player actually used in case of medium.- パラメータ:
mediumPlayer
-実際の霊媒師プレイヤーthe actual medium player
-
getBodyguardPlayer
狩人用プレイヤーを返す.Returns the player actually used in case of bodyguard.- 戻り値:
- 狩人用プレイヤーthe player actually used in case of bodyguard
-
setBodyguardPlayer
狩人用プレイヤーをセットする.Sets the player actually used in case of bodyguard.- パラメータ:
bodyguardPlayer
-実際の狩人プレイヤーthe actual bodyguard player
-
getPossessedPlayer
裏切り者用プレイヤーを返す.Returns the player actually used in case of possessed.- 戻り値:
- 裏切り者用プレイヤーthe player actually used in case of possessed
-
setPossessedPlayer
裏切り者用プレイヤーをセットする.Sets the player actually used in case of possessed.- パラメータ:
possessedPlayer
-実際の裏切り者プレイヤーthe actual possessed player
-
getWerewolfPlayer
人狼用プレイヤーを返す.Returns the player actually used in case of werewolf.- 戻り値:
- 人狼用プレイヤーthe player actually used in case of werewolf
-
setWerewolfPlayer
人狼用プレイヤーをセットする.Sets the player actually used in case of werewolf.- パラメータ:
werewolfPlayer
-実際の人狼プレイヤーthe actual werewolf player
-
getName
インタフェースからコピーされた説明:Player
プレイヤーの名前を返します。Get the player name. -
update
インタフェースからコピーされた説明:Player
ゲームの情報が更新されたときに呼び出されます。Called when the game information updated. -
initialize
インタフェースからコピーされた説明:Player
ゲーム開始時に呼び出されます。Called when the game started.- 定義:
initialize
インタフェース内Player
- パラメータ:
gameInfo
-ゲームの情報Game informationsgameSetting
-ゲームの設定Game settings
-
dayStart
public final void dayStart()インタフェースからコピーされた説明:Player
1日の始まりに呼び出されます。Called when the day started. -
talk
インタフェースからコピーされた説明:Player
各プレイヤーはこのメソッドに意見を返すことで会話することができます。
戻り値の文字列は人狼知能プロトコルに沿ったものにする必要があります。 nullを返した場合は、SKIPとみなされます。Each player can talk their opinions throw this method.
Return texts must be written in aiwolf protocol. When you return null, it will be considered as SKIP. -
whisper
インタフェースからコピーされた説明:Player
各人狼はこのメソッドに意見を返すことで人狼同士での会話ができます。Each wolves can talk thier opinions throw this method. -
vote
インタフェースからコピーされた説明:Player
追放したいエージェントに投票します。Vote agent to execute. -
attack
インタフェースからコピーされた説明:Player
人狼によって、襲撃したいエージェントを決めます。Decide agent who to be attacked by wolves. -
divine
インタフェースからコピーされた説明:Player
占い師によって、占うエージェントを決めます。Dicide agent to divine by Seer. -
guard
インタフェースからコピーされた説明:Player
狩人によって、護衛するエージェントを決めます。Dicide agent to guard by BodyGuard. -
finish
public final void finish()インタフェースからコピーされた説明:Player
ゲーム終了時に呼び出されます。
このメソッドが呼び出される前に、ゲームの情報のすべての情報は更新されます。Called when the game finished.
Before this method is called, gameinfo is updated with all information.
-