Пример #1
0
        sealed public override void Initialize(GameInfo gameInfo, GameSetting gameSetting)
        {
            Role?myRole = gameInfo.Role;

            switch (myRole)
            {
            case Role.VILLAGER:
                rolePlayer = VillagerPlayer;
                break;

            case Role.SEER:
                rolePlayer = SeerPlayer;
                break;

            case Role.MEDIUM:
                rolePlayer = MediumPlayer;
                break;

            case Role.BODYGUARD:
                rolePlayer = BodyguardPlayer;
                break;

            case Role.POSSESSED:
                rolePlayer = PossessedPlayer;
                break;

            case Role.WEREWOLF:
                rolePlayer = WerewolfPlayer;
                break;

            default:
                rolePlayer = VillagerPlayer;
                break;
            }
            rolePlayer.Initialize(gameInfo, gameSetting);
        }
 public override sealed void Initialize(GameInfo gameInfo, GameSetting gameSetting)
 {
     Role? myRole = gameInfo.Role;
     switch (myRole)
     {
         case Role.VILLAGER:
             rolePlayer = VillagerPlayer;
             break;
         case Role.SEER:
             rolePlayer = SeerPlayer;
             break;
         case Role.MEDIUM:
             rolePlayer = MediumPlayer;
             break;
         case Role.BODYGUARD:
             rolePlayer = BodyguardPlayer;
             break;
         case Role.POSSESSED:
             rolePlayer = PossessedPlayer;
             break;
         case Role.WEREWOLF:
             rolePlayer = WerewolfPlayer;
             break;
         default:
             rolePlayer = VillagerPlayer;
             break;
     }
     rolePlayer.Initialize(gameInfo, gameSetting);
 }