summaryrefslogtreecommitdiff
path: root/2013-battlecity/Entelect.BattleCity.Challenge/Program.cs
blob: 376807a78797a942fca7c45e27c7fdcd2ec813ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.ServiceModel;

namespace Entelect.BattleCity.Challenge
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                var endpointConfigurationName = "ChallengePort";
                var address = new EndpointAddress(args[0]);
                var service = new ChallengeService.ChallengeClient(endpointConfigurationName, address);
                var board = service.login();

                var game = new GameInProgress(service, board);
                game.run();
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Uncaught exception thrown. Exiting.");
                Console.Error.WriteLine(ex.StackTrace.ToString());
            }
        }
    }
}