Ejemplo n.º 1
0
        private void PlayGames()
        {
            var gameStatus = gameClient.GetAccountGameInfo();

            while (gameStatus.AvailablePoints > 0)
            {
                var prizes = gameClient.Play(game, character.Id);

                if (prizes.Count == 0)
                {
                    logger.InfoFormat("Sorry, I just played {0} and you didn't win anything.  Better luck next time!", game.Name);
                }
                else
                {
                    foreach (var prize in prizes)
                    {
                        logger.InfoFormat("Congratulations!  I just played {0} and you won {1} {2}", game.Name, prize.Quantity, prize.Name);

                        if (pushOverClient != null)
                        {
                            pushOverClient.SendMessage(string.Format("You won {0} {1}", prize.Quantity, prize.Name), string.Format("{0} rewards", game.Name));
                        }
                    }
                }

                gameStatus = gameClient.GetAccountGameInfo();
            }

            logger.InfoFormat("Your next game will be played at {0}", DateTime.Now.AddSeconds(gameStatus.SecondsUntilNextPoint));

            SetTimer(gameStatus.SecondsUntilNextPoint);
        }
Ejemplo n.º 2
0
        public void Verify_Play()
        {
            var card = new Game()
            {
                Name = "Shinies", Url = "/chatservice/scratch/threeofsix"
            };

            client.Play(card, characterId);
        }