summaryrefslogtreecommitdiff
path: root/Entelect.BattleCity.Challenge/Program.cs
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@entelect.co.za>2013-11-10 20:35:42 +0200
committerJustin Worthe <justin.worthe@entelect.co.za>2013-11-10 20:35:42 +0200
commita0c4a6c45fc425e5957b3f838155e4a93c73c269 (patch)
tree2e1dae428c9e41da10142f65130b340f3ec22dc4 /Entelect.BattleCity.Challenge/Program.cs
parentcaed4974a949c43b7dbcc8dbc545189aab710919 (diff)
Experimental new method of going straight to center and then shooting forwards
Does not really work on the map it was intended for :( Still, might be useful.
Diffstat (limited to 'Entelect.BattleCity.Challenge/Program.cs')
-rw-r--r--Entelect.BattleCity.Challenge/Program.cs23
1 files changed, 16 insertions, 7 deletions
diff --git a/Entelect.BattleCity.Challenge/Program.cs b/Entelect.BattleCity.Challenge/Program.cs
index 29d8e8e..ec8af76 100644
--- a/Entelect.BattleCity.Challenge/Program.cs
+++ b/Entelect.BattleCity.Challenge/Program.cs
@@ -1,4 +1,5 @@
-using System.ServiceModel;
+using System;
+using System.ServiceModel;
namespace Entelect.BattleCity.Challenge
{
@@ -6,13 +7,21 @@ namespace Entelect.BattleCity.Challenge
{
static void Main(string[] args)
{
- var endpointConfigurationName = "ChallengePort";
- var address = new EndpointAddress(args[0]);
- var service = new ChallengeService.ChallengeClient(endpointConfigurationName, address);
- var board = service.login();
+ 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();
+ var game = new GameInProgress(service, board);
+ game.run();
+ }
+ catch (Exception ex)
+ {
+ Console.Error.WriteLine("Exception thrown. Exiting");
+ Console.Error.WriteLine(ex.StackTrace.ToString());
+ }
}
}
}