internal void SetPowerChoice(int playerId, PowerChoices powerChoices)
        {
            var choiceTask = SabberStoneConverter.CreatePlayerTaskChoice(_originalGame, playerId, powerChoices.ChoiceType, powerChoices.Entities);

            _originalGame.Process(choiceTask);

            _poGame = CreatePartiallyObservableGame(_originalGame);
        }
Exemple #2
0
        public PowerChoices PowerChoices(Game game, PowerChoices powerChoices)
        {
            var powerChoicesId = _random.Next(powerChoices.Entities.Count);

            return(new PowerChoices()
            {
                ChoiceType = powerChoices.ChoiceType, Entities = new List <int>()
                {
                    powerChoices.Entities[powerChoicesId]
                }
            });
        }
 private void SendPowerChoicesChoice(PowerChoices powerChoices)
 {
     PowerChoices = null;
     _sendGameMessage(MsgType.InGame, true,
                      JsonConvert.SerializeObject(
                          new GameData()
     {
         GameId         = GameId,
         PlayerId       = PlayerId,
         GameDataType   = GameDataType.PowerChoice,
         GameDataObject = JsonConvert.SerializeObject(powerChoices)
     }));
 }
Exemple #4
0
        public PowerChoices PowerChoices(PowerChoices powerChoices)
        {
            var powerChoicesId = _random.Next(powerChoices.Entities.Count);

            Log.Info($"SendPowerChoicesChoice[RandomAI] -> choices:{powerChoicesId} {powerChoices.ChoiceType}");

            return(new PowerChoices()
            {
                ChoiceType = powerChoices.ChoiceType, Entities = new List <int>()
                {
                    powerChoices.Entities[powerChoicesId]
                }
            });
        }
Exemple #5
0
        public override void Read()
        {
            ArtifactGUID = _worldPacket.ReadPackedGuid();
            ForgeGUID    = _worldPacket.ReadPackedGuid();

            var powerCount = _worldPacket.ReadUInt32();

            for (var i = 0; i < powerCount; ++i)
            {
                ArtifactPowerChoice artifactPowerChoice;
                artifactPowerChoice.ArtifactPowerID = _worldPacket.ReadUInt32();
                artifactPowerChoice.Rank            = _worldPacket.ReadUInt8();
                PowerChoices.Add(artifactPowerChoice);
            }
        }
 internal void SetPowerChoices(PowerChoices powerChoices)
 {
     PowerChoices = powerChoices;
     CallPowerChoices();
 }
Exemple #7
0
 public PowerChoices PowerChoices(Game game, PowerChoices powerChoices)
 {
     return(null);
 }
Exemple #8
0
 public PowerChoices PowerChoices(Game game, PowerChoices powerChoices)
 {
     throw new NotImplementedException();
 }