Ejemplo n.º 1
0
        public Game(JsonValue jsonValue, User currentUser)
        {
            this.CurrentUser = currentUser;

            ReloadGame(jsonValue);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            User user = new User("*****@*****.**", "password");
            if (user.Login())
            {
                user.Refresh();

                foreach (Game game in user.Games)
                {
                    if (game.MyPlayerNumber == 1)
                        Console.WriteLine("{0} ({1}) vs {2} ({3}), {4}", game.CurrentUser.Username, game.Player1Crowns.Count, game.Opponent.Username, game.Player2Crowns.Count, game.Status);
                    else
                        Console.WriteLine("{0} ({1}) vs {2} ({3}), {4}", game.CurrentUser.Username, game.Player2Crowns.Count, game.Opponent.Username, game.Player1Crowns.Count, game.Status);
                }
            }

            Console.ReadLine();
        }