パッケージ org.aiwolf.sample.lib

クラス AbstractRoleAssignPlayer

  • すべての実装されたインタフェース:
    Player
    直系の既知のサブクラス:
    SampleRoleAssignPlayer

    public abstract class AbstractRoleAssignPlayer
    extends java.lang.Object
    implements Player
    役職ごとに実際に使用するプレイヤーを切り替えるプレイヤーの抽象クラス
    Abstract player class which switches player actually used according to its role.
    • メソッドの概要

      すべてのメソッド インスタンス・メソッド abstractメソッド concreteメソッド 
      修飾子とタイプ メソッド 説明
      Agent attack()
      人狼によって、襲撃したいエージェントを決めます。
      void dayStart()
      1日の始まりに呼び出されます。
      Agent divine()
      占い師によって、占うエージェントを決めます。
      void finish()
      ゲーム終了時に呼び出されます。
      Player getBodyguardPlayer()
      狩人用プレイヤーを返す. Returns the player actually used in case of bodyguard.
      Player getMediumPlayer()
      霊媒師用プレイヤーを返す. Returns the player actually used in case of medium.
      abstract java.lang.String getName()
      プレイヤーの名前を返します。
      Player getPossessedPlayer()
      裏切り者用プレイヤーを返す. Returns the player actually used in case of possessed.
      Player getSeerPlayer()
      占い師用プレイヤーを返す. Returns the player actually used in case of seer.
      Player getVillagerPlayer()
      村人用プレイヤーを返す. Returns the player actually used in case of villager.
      Player getWerewolfPlayer()
      人狼用プレイヤーを返す. Returns the player actually used in case of werewolf.
      Agent guard()
      狩人によって、護衛するエージェントを決めます。
      void initialize​(GameInfo gameInfo, GameSetting gameSetting)
      ゲーム開始時に呼び出されます。
      void setBodyguardPlayer​(Player bodyGuardPlayer)
      狩人用プレイヤーをセットする. Sets the player actually used in case of bodyguard.
      void setMediumPlayer​(Player mediumPlayer)
      霊媒師用プレイヤーをセットする. Sets the player actually used in case of medium.
      void setPossessedPlayer​(Player possesedPlayer)
      裏切り者用プレイヤーをセットする. Sets the player actually used in case of possessed.
      void setSeerPlayer​(Player seerPlayer)
      占い師用プレイヤーをセットする. Sets the player actually used in case of seer.
      void setVillagerPlayer​(Player villagerPlayer)
      村人用プレイヤーをセットする. Sets the player actually used in case of villager.
      void setWerewolfPlayer​(Player werewolfPlayer)
      人狼用プレイヤーをセットする. Sets the player actually used in case of werewolf.
      java.lang.String talk()
      各プレイヤーはこのメソッドに意見を返すことで会話することができます。
      void update​(GameInfo gameInfo)
      ゲームの情報が更新されたときに呼び出されます。
      Agent vote()
      追放したいエージェントに投票します。
      java.lang.String whisper()
      各人狼はこのメソッドに意見を返すことで人狼同士での会話ができます。
      • クラスから継承されたメソッド java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • コンストラクタの詳細

      • AbstractRoleAssignPlayer

        public AbstractRoleAssignPlayer()
    • メソッドの詳細

      • getVillagerPlayer

        public final Player getVillagerPlayer()
        村人用プレイヤーを返す.
        Returns the player actually used in case of villager.
        戻り値:
        村人用プレイヤー
        the player actually used in case of villager
      • setVillagerPlayer

        public final void setVillagerPlayer​(Player villagerPlayer)
        村人用プレイヤーをセットする.
        Sets the player actually used in case of villager.
        パラメータ:
        villagerPlayer -
        実際の村人プレイヤー
        the actual villager player
      • getSeerPlayer

        public final Player getSeerPlayer()
        占い師用プレイヤーを返す.
        Returns the player actually used in case of seer.
        戻り値:
        占い師用プレイヤー
        the player actually used in case of seer
      • setSeerPlayer

        public final void setSeerPlayer​(Player seerPlayer)
        占い師用プレイヤーをセットする.
        Sets the player actually used in case of seer.
        パラメータ:
        seerPlayer -
        実際の占い師プレイヤー
        the actual seer player
      • getMediumPlayer

        public final Player getMediumPlayer()
        霊媒師用プレイヤーを返す.
        Returns the player actually used in case of medium.
        戻り値:
        霊媒師用プレイヤー
        the player actually used in case of medium
      • setMediumPlayer

        public final void setMediumPlayer​(Player mediumPlayer)
        霊媒師用プレイヤーをセットする.
        Sets the player actually used in case of medium.
        パラメータ:
        mediumPlayer -
        実際の霊媒師プレイヤー
        the actual medium player
      • getBodyguardPlayer

        public final Player getBodyguardPlayer()
        狩人用プレイヤーを返す.
        Returns the player actually used in case of bodyguard.
        戻り値:
        狩人用プレイヤー
        the player actually used in case of bodyguard
      • setBodyguardPlayer

        public final void setBodyguardPlayer​(Player bodyGuardPlayer)
        狩人用プレイヤーをセットする.
        Sets the player actually used in case of bodyguard.
        パラメータ:
        bodyguardPlayer -
        実際の狩人プレイヤー
        the actual bodyguard player
      • getPossessedPlayer

        public final Player getPossessedPlayer()
        裏切り者用プレイヤーを返す.
        Returns the player actually used in case of possessed.
        戻り値:
        裏切り者用プレイヤー
        the player actually used in case of possessed
      • setPossessedPlayer

        public final void setPossessedPlayer​(Player possesedPlayer)
        裏切り者用プレイヤーをセットする.
        Sets the player actually used in case of possessed.
        パラメータ:
        possessedPlayer -
        実際の裏切り者プレイヤー
        the actual possessed player
      • getWerewolfPlayer

        public final Player getWerewolfPlayer()
        人狼用プレイヤーを返す.
        Returns the player actually used in case of werewolf.
        戻り値:
        人狼用プレイヤー
        the player actually used in case of werewolf
      • setWerewolfPlayer

        public final void setWerewolfPlayer​(Player werewolfPlayer)
        人狼用プレイヤーをセットする.
        Sets the player actually used in case of werewolf.
        パラメータ:
        werewolfPlayer -
        実際の人狼プレイヤー
        the actual werewolf player
      • getName

        public abstract java.lang.String getName()
        インタフェースからコピーされた説明: Player
        プレイヤーの名前を返します。
        Get the player name.
        定義:
        getName インタフェース内 Player
        戻り値:
        プレイヤーの名前
        Player name
      • update

        public final void update​(GameInfo gameInfo)
        インタフェースからコピーされた説明: Player
        ゲームの情報が更新されたときに呼び出されます。
        Called when the game information updated.
        定義:
        update インタフェース内 Player
        パラメータ:
        gameInfo -
        ゲームの情報
        Information of game
      • initialize

        public final void initialize​(GameInfo gameInfo,
                                     GameSetting gameSetting)
        インタフェースからコピーされた説明: Player
        ゲーム開始時に呼び出されます。
        Called when the game started.
        定義:
        initialize インタフェース内 Player
        パラメータ:
        gameInfo -
        ゲームの情報
        Game informations
        gameSetting -
        ゲームの設定
        Game settings
      • dayStart

        public final void dayStart()
        インタフェースからコピーされた説明: Player
        1日の始まりに呼び出されます。
        Called when the day started.
        定義:
        dayStart インタフェース内 Player
      • talk

        public final java.lang.String 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.
        定義:
        talk インタフェース内 Player
        戻り値:
        人狼知能プロトコルをもとにした発言
        Aiwolf protocol based talk
      • whisper

        public final java.lang.String whisper()
        インタフェースからコピーされた説明: Player
        各人狼はこのメソッドに意見を返すことで人狼同士での会話ができます。
        Each wolves can talk thier opinions throw this method.
        定義:
        whisper インタフェース内 Player
        戻り値:
        人狼知能プロトコルをもとにしたささやき
        Aiwolf protocol based whisper
      • vote

        public final Agent vote()
        インタフェースからコピーされた説明: Player
        追放したいエージェントに投票します。
        Vote agent to execute.
        定義:
        vote インタフェース内 Player
        戻り値:
        投票したいエージェント
        Agent of vote target
      • attack

        public final Agent attack()
        インタフェースからコピーされた説明: Player
        人狼によって、襲撃したいエージェントを決めます。
        Decide agent who to be attacked by wolves.
        定義:
        attack インタフェース内 Player
        戻り値:
        襲撃したいエージェント
        Agent of attack target.
      • divine

        public final Agent divine()
        インタフェースからコピーされた説明: Player
        占い師によって、占うエージェントを決めます。
        Dicide agent to divine by Seer.
        定義:
        divine インタフェース内 Player
        戻り値:
        占うエージェント
        Agent of divine target
      • guard

        public final Agent guard()
        インタフェースからコピーされた説明: Player
        狩人によって、護衛するエージェントを決めます。
        Dicide agent to guard by BodyGuard.
        定義:
        guard インタフェース内 Player
        戻り値:
        護衛するエージェント
        Agent of guard target
      • finish

        public final void finish()
        インタフェースからコピーされた説明: Player
        ゲーム終了時に呼び出されます。
        このメソッドが呼び出される前に、ゲームの情報のすべての情報は更新されます。
        Called when the game finished.
        Before this method is called, gameinfo is updated with all information.
        定義:
        finish インタフェース内 Player