From be89211af895548425be999f660a1195efe9fc8a Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Tue, 19 Apr 2022 21:22:50 +0200 Subject: Refile for merging repos --- .gitignore | 4 - 2013-battlecity/.gitignore | 4 + 2013-battlecity/Entelect.BattleCity.Challenge.sln | 20 + .../Entelect.BattleCity.Challenge/AiAgent.cs | 196 ++++ .../Entelect.BattleCity.Challenge/App.config | 21 + .../Entelect.BattleCity.Challenge/BoardCell.cs | 16 + .../Entelect.BattleCity.Challenge.csproj | 109 ++ .../GameInProgress.cs | 157 +++ .../Entelect.BattleCity.Challenge/Move.cs | 24 + .../Entelect.BattleCity.Challenge/Program.cs | 27 + .../Properties/AssemblyInfo.cs | 36 + .../ChallengeService/ChallengeService.wsdl | 294 ++++++ ...ity.Challenge.ChallengeService.delta.datasource | 10 + ...City.Challenge.ChallengeService.game.datasource | 10 + ...e.ChallengeService.getStatusResponse.datasource | 10 + ...lenge.ChallengeService.loginResponse.datasource | 10 + ...e.ChallengeService.setActionResponse.datasource | 10 + ....ChallengeService.setActionsResponse.datasource | 10 + ...ity.Challenge.ChallengeService.state.datasource | 10 + .../ChallengeService/Reference.cs | 1104 ++++++++++++++++++++ .../ChallengeService/Reference.svcmap | 31 + .../ChallengeService/configuration.svcinfo | 10 + .../ChallengeService/configuration91.svcinfo | 201 ++++ .../Entelect.BattleCity.Challenge/compile.bat | 1 + .../Entelect.BattleCity.Challenge/start.bat | 1 + 2013-battlecity/README.md | 12 + Entelect.BattleCity.Challenge.sln | 20 - Entelect.BattleCity.Challenge/AiAgent.cs | 196 ---- Entelect.BattleCity.Challenge/App.config | 21 - Entelect.BattleCity.Challenge/BoardCell.cs | 16 - .../Entelect.BattleCity.Challenge.csproj | 109 -- Entelect.BattleCity.Challenge/GameInProgress.cs | 157 --- Entelect.BattleCity.Challenge/Move.cs | 24 - Entelect.BattleCity.Challenge/Program.cs | 27 - .../Properties/AssemblyInfo.cs | 36 - .../ChallengeService/ChallengeService.wsdl | 294 ------ ...ity.Challenge.ChallengeService.delta.datasource | 10 - ...City.Challenge.ChallengeService.game.datasource | 10 - ...e.ChallengeService.getStatusResponse.datasource | 10 - ...lenge.ChallengeService.loginResponse.datasource | 10 - ...e.ChallengeService.setActionResponse.datasource | 10 - ....ChallengeService.setActionsResponse.datasource | 10 - ...ity.Challenge.ChallengeService.state.datasource | 10 - .../ChallengeService/Reference.cs | 1104 -------------------- .../ChallengeService/Reference.svcmap | 31 - .../ChallengeService/configuration.svcinfo | 10 - .../ChallengeService/configuration91.svcinfo | 201 ---- Entelect.BattleCity.Challenge/compile.bat | 1 - Entelect.BattleCity.Challenge/start.bat | 1 - README.md | 12 - 50 files changed, 2334 insertions(+), 2334 deletions(-) delete mode 100644 .gitignore create mode 100644 2013-battlecity/.gitignore create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge.sln create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/AiAgent.cs create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/App.config create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/BoardCell.cs create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Entelect.BattleCity.Challenge.csproj create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/GameInProgress.cs create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Move.cs create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Program.cs create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Properties/AssemblyInfo.cs create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/ChallengeService.wsdl create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.delta.datasource create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.game.datasource create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse.datasource create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.loginResponse.datasource create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionResponse.datasource create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse.datasource create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.state.datasource create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.cs create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.svcmap create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration.svcinfo create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration91.svcinfo create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/compile.bat create mode 100644 2013-battlecity/Entelect.BattleCity.Challenge/start.bat create mode 100644 2013-battlecity/README.md delete mode 100644 Entelect.BattleCity.Challenge.sln delete mode 100644 Entelect.BattleCity.Challenge/AiAgent.cs delete mode 100644 Entelect.BattleCity.Challenge/App.config delete mode 100644 Entelect.BattleCity.Challenge/BoardCell.cs delete mode 100644 Entelect.BattleCity.Challenge/Entelect.BattleCity.Challenge.csproj delete mode 100644 Entelect.BattleCity.Challenge/GameInProgress.cs delete mode 100644 Entelect.BattleCity.Challenge/Move.cs delete mode 100644 Entelect.BattleCity.Challenge/Program.cs delete mode 100644 Entelect.BattleCity.Challenge/Properties/AssemblyInfo.cs delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/ChallengeService.wsdl delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.delta.datasource delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.game.datasource delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse.datasource delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.loginResponse.datasource delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionResponse.datasource delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse.datasource delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.state.datasource delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.cs delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.svcmap delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration.svcinfo delete mode 100644 Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration91.svcinfo delete mode 100644 Entelect.BattleCity.Challenge/compile.bat delete mode 100644 Entelect.BattleCity.Challenge/start.bat delete mode 100644 README.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ef293be..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -Entelect.BattleCity.Challenge/obj -Entelect.BattleCity.Challenge/bin -*.suo -*.csproj.user diff --git a/2013-battlecity/.gitignore b/2013-battlecity/.gitignore new file mode 100644 index 0000000..ef293be --- /dev/null +++ b/2013-battlecity/.gitignore @@ -0,0 +1,4 @@ +Entelect.BattleCity.Challenge/obj +Entelect.BattleCity.Challenge/bin +*.suo +*.csproj.user diff --git a/2013-battlecity/Entelect.BattleCity.Challenge.sln b/2013-battlecity/Entelect.BattleCity.Challenge.sln new file mode 100644 index 0000000..2b5f5ea --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Entelect.BattleCity.Challenge", "Entelect.BattleCity.Challenge\Entelect.BattleCity.Challenge.csproj", "{B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/AiAgent.cs b/2013-battlecity/Entelect.BattleCity.Challenge/AiAgent.cs new file mode 100644 index 0000000..a1ca0e5 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/AiAgent.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; + +namespace Entelect.BattleCity.Challenge +{ + class AiAgent + { + private int? _lastX; + private int? _lastY; + private ChallengeService.action _lastAction; + private bool _hasShotFromLastPosition; + + private int _tankId; + + private int? _targetX; + + private bool _checkForOpenPathToMiddle; + private bool _headingToMiddle; + + public AiAgent(int tankId, bool checkForOpenPathToMiddle) + { + _tankId = tankId; + _checkForOpenPathToMiddle = checkForOpenPathToMiddle; + _lastAction = ChallengeService.action.NONE; + _hasShotFromLastPosition = false; + _headingToMiddle = false; + } + + public Move GetBestMove(ChallengeService.game game, BoardCell[][] board, ChallengeService.player me, ChallengeService.player enemy) + { + Move move = null; + ChallengeService.unit tank = findTankInPlayer(_tankId, me); + + if (tank == null) + { + return null; + } + + if (tank.x != _lastX || tank.y != _lastY) + { + _hasShotFromLastPosition = false; + } + + var bulletInAir = checkIsBulletInAir(board, me, tank); + var stuckLastTurn = checkStuckLastTurn(tank); + + var enemyBase = enemy.@base; + + var pastMidpoint = (Math.Abs(enemyBase.y-tank.y) < (board[0].Length / 2)); + + if (stuckLastTurn && (tank.direction == ChallengeService.direction.UP || tank.direction == ChallengeService.direction.DOWN) && enemyBase.x != tank.x) + { + _targetX = tank.x + (pastMidpoint!=(tank.x > enemyBase.x) ? +1 : -1); + } + + if (_checkForOpenPathToMiddle && !_headingToMiddle && tank.x != enemyBase.x) + { + _headingToMiddle = testPathToMiddleIsOpen(board, tank, enemyBase); + } + else if (_checkForOpenPathToMiddle && _headingToMiddle && tank.x == enemyBase.x) + { + _headingToMiddle = false; + } + + + ChallengeService.direction chosenDirection = + _headingToMiddle ? + ( + tank.x > enemyBase.x ? + ChallengeService.direction.LEFT : + ChallengeService.direction.RIGHT + ) : + ( + tank.y != enemyBase.y ? + ( + _targetX.HasValue && _targetX != tank.x ? + ( + tank.x > _targetX ? + ChallengeService.direction.LEFT : + ChallengeService.direction.RIGHT + ) : + ( + tank.y > enemyBase.y ? + ChallengeService.direction.UP : + ChallengeService.direction.DOWN + ) + ) : + ( + tank.x > enemyBase.x ? + ChallengeService.direction.LEFT : + ChallengeService.direction.RIGHT + ) + ); + + if (chosenDirection != tank.direction || bulletInAir || _headingToMiddle) + { + move = MoveInDirection(tank.id, chosenDirection); + } + else + { + move = new Move(tank.id, ChallengeService.action.FIRE); + _hasShotFromLastPosition = true; + } + + _lastX = tank.x; + _lastY = tank.y; + _lastAction = move.Action; + + return move; + } + + private bool testPathToMiddleIsOpen(BoardCell[][] board, ChallengeService.unit tank, ChallengeService.@base enemyBase) + { + var minY = tank.y - 2; + var maxY = tank.y + 2; + var minX = Math.Min(tank.x, enemyBase.x)-2; + var maxX = Math.Max(tank.x, enemyBase.x)+2; + + bool insideRange = board.Length > maxX && board[maxX].Length > maxY && 0 <= minX && 0 <= minY; + if (!insideRange) + { + return false; + } + + for (int x = minX; x <= maxX; ++x) + { + for (int y = minY; y <= maxY; ++y) + { + if (board[x][y] != BoardCell.EMPTY) + { + return false; + } + + } + } + + return true; + } + + private ChallengeService.unit findTankInPlayer(int tankId, ChallengeService.player me) + { + if (me != null && me.units != null) + { + foreach (var unit in me.units) + { + if (unit.id == _tankId) + { + return unit; + } + } + } + return null; + } + + public Move MoveInDirection(int tankId, ChallengeService.direction direction) + { + switch (direction) + { + case ChallengeService.direction.UP: + return new Move(tankId, ChallengeService.action.UP); + case ChallengeService.direction.DOWN: + return new Move(tankId, ChallengeService.action.DOWN); + case ChallengeService.direction.LEFT: + return new Move(tankId, ChallengeService.action.LEFT); + case ChallengeService.direction.RIGHT: + return new Move(tankId, ChallengeService.action.RIGHT); + default: + return new Move(tankId, ChallengeService.action.NONE); + } + } + + private bool checkIsBulletInAir(BoardCell[][] board, ChallengeService.player me, ChallengeService.unit tank) + { + var bulletInAir = false; + if (me.bullets != null) + { + foreach (var bullet in me.bullets) + { + if (Math.Abs(bullet.x - tank.x) < board.Length / 6) + { + bulletInAir = true; + } + } + } + + return bulletInAir; + } + + private bool checkStuckLastTurn(ChallengeService.unit tank) + { + return !(_lastAction == ChallengeService.action.FIRE || _lastAction == ChallengeService.action.NONE) + && tank.x == _lastX && tank.y == _lastY + && _hasShotFromLastPosition; + } + } +} diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/App.config b/2013-battlecity/Entelect.BattleCity.Challenge/App.config new file mode 100644 index 0000000..ef162fd --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/App.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/BoardCell.cs b/2013-battlecity/Entelect.BattleCity.Challenge/BoardCell.cs new file mode 100644 index 0000000..bd7063e --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/BoardCell.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Entelect.BattleCity.Challenge +{ + public enum BoardCell + { + EMPTY, + WALL, + BASE, + OUT_OF_BOUNDS + } +} diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Entelect.BattleCity.Challenge.csproj b/2013-battlecity/Entelect.BattleCity.Challenge/Entelect.BattleCity.Challenge.csproj new file mode 100644 index 0000000..0a8cb97 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Entelect.BattleCity.Challenge.csproj @@ -0,0 +1,109 @@ + + + + + Debug + AnyCPU + {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259} + Exe + Properties + Entelect.BattleCity.Challenge + Entelect.BattleCity.Challenge + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + True + True + Reference.svcmap + + + + + + + Reference.svcmap + + + Reference.svcmap + + + Reference.svcmap + + + Reference.svcmap + + + Reference.svcmap + + + Reference.svcmap + + + Reference.svcmap + + + + + + + + + + + + + + + + + WCF Proxy Generator + Reference.cs + + + + + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/GameInProgress.cs b/2013-battlecity/Entelect.BattleCity.Challenge/GameInProgress.cs new file mode 100644 index 0000000..23a6550 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/GameInProgress.cs @@ -0,0 +1,157 @@ +using System; +using System.Windows; +using System.Collections.Generic; +using System.Threading; +using System.Diagnostics; +using System.Text; + +namespace Entelect.BattleCity.Challenge +{ + public class GameInProgress + { + private static ChallengeService.action _nullAction = ChallengeService.action.NONE; + + private ChallengeService.ChallengeClient _service; + private ChallengeService.game _currentState; + private ChallengeService.player _me; + private ChallengeService.player _enemy; + + private BoardCell[][] _board; + + private AiAgent _tank1Ai; + private AiAgent _tank2Ai; + + private Stopwatch _stepTimer; + + public GameInProgress(ChallengeService.ChallengeClient service, ChallengeService.state?[][] board) + { + _service = service; + _board = getBoardCellArrayFromServiceStates(board); + + updateGameStatus(true); + _board[_me.@base.x][_me.@base.y] = BoardCell.BASE; + _board[_enemy.@base.x][_enemy.@base.y] = BoardCell.BASE; + + _tank1Ai = new AiAgent(_me.units[0].id, false); + _tank2Ai = new AiAgent(_me.units[1].id, true); + } + + + + public void run() + { + while (true) + { + if (_currentState.millisecondsToNextTick-_stepTimer.ElapsedMilliseconds < 0) + { + updateGameStatus(); + continue; + } + makeNextMove(); + waitForNextTick(); + + updateGameStatus(); + } + } + + private void makeNextMove() + { + Move tank1Move = _tank1Ai.GetBestMove(_currentState, _board, _me, _enemy); + Move tank2Move = _tank2Ai.GetBestMove(_currentState, _board, _me, _enemy); + + sendMovesToService(tank1Move, tank2Move); + } + + private void sendMovesToService(Move tank1Move, Move tank2Move) + { + if (tank1Move != null && tank2Move != null) + { + _service.setActions(tank1Move.Action, tank2Move.Action); + } + else if (tank1Move != null) + { + _service.setAction(tank1Move.Tank, tank1Move.Action); + } + else if (tank2Move != null) + { + _service.setAction(tank2Move.Tank, tank2Move.Action); + } + } + + private void waitForNextTick() + { + var sleepTime = TimeSpan.FromMilliseconds(_currentState.millisecondsToNextTick-_stepTimer.ElapsedMilliseconds+500); + if (sleepTime.Ticks > 0L) + { + try + { + Thread.Sleep(sleepTime); + } + catch (Exception ex) + { + } + } + } + + private void updateGameStatus(bool firstTime = false) + { + if (firstTime) + { + _currentState = _service.getStatus(); + } + else + { + var previousTick = _currentState.currentTick; + while (previousTick == _currentState.currentTick) + { + _currentState = _service.getStatus(); + } + } + _stepTimer = Stopwatch.StartNew(); + + foreach (ChallengeService.player player in _currentState.players) + { + if (player.name.Equals(_currentState.playerName)) + { + _me = player; + } + else + { + _enemy = player; + } + } + } + + private BoardCell[][] getBoardCellArrayFromServiceStates(ChallengeService.state?[][] stateBoard) + { + BoardCell[][] newBoard = new BoardCell[stateBoard.Length][]; + for (int x = 0; x < stateBoard.Length; ++x) + { + newBoard[x] = new BoardCell[stateBoard[x].Length]; + for (int y = 0; y < stateBoard[x].Length; ++y) + { + switch (stateBoard[x][y]) + { + case null: + case ChallengeService.state.NONE: + case ChallengeService.state.EMPTY: + newBoard[x][y] = BoardCell.EMPTY; + break; + case ChallengeService.state.FULL: + newBoard[x][y] = BoardCell.WALL; + break; + case ChallengeService.state.OUT_OF_BOUNDS: + newBoard[x][y] = BoardCell.OUT_OF_BOUNDS; + break; + default: + newBoard[x][y] = BoardCell.OUT_OF_BOUNDS; + break; + } + + } + } + + return newBoard; + } + } +} diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Move.cs b/2013-battlecity/Entelect.BattleCity.Challenge/Move.cs new file mode 100644 index 0000000..7fba664 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Move.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Entelect.BattleCity.Challenge +{ + class Move + { + public int Tank { get; private set; } + public ChallengeService.action Action { get; private set; } + + public Move(int tank, ChallengeService.action action) + { + Tank = tank; + Action = action; + } + + public override string ToString() + { + return string.Format("Tank {0}: {1}", Tank, Action.ToString()); + } + } +} diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Program.cs b/2013-battlecity/Entelect.BattleCity.Challenge/Program.cs new file mode 100644 index 0000000..376807a --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Program.cs @@ -0,0 +1,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()); + } + } + } +} diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Properties/AssemblyInfo.cs b/2013-battlecity/Entelect.BattleCity.Challenge/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..97397b4 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Entelect.BattleCity.Challenge")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Entelect.BattleCity.Challenge")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8e9e513d-3232-4b92-83dd-13ec54131857")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/ChallengeService.wsdl b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/ChallengeService.wsdl new file mode 100644 index 0000000..0d7d4a9 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/ChallengeService.wsdl @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.delta.datasource b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.delta.datasource new file mode 100644 index 0000000..ba30593 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.delta.datasource @@ -0,0 +1,10 @@ + + + + Entelect.BattleCity.Challenge.ChallengeService.delta, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.game.datasource b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.game.datasource new file mode 100644 index 0000000..295ea08 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.game.datasource @@ -0,0 +1,10 @@ + + + + Entelect.BattleCity.Challenge.ChallengeService.game, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse.datasource b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse.datasource new file mode 100644 index 0000000..6701b3e --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse.datasource @@ -0,0 +1,10 @@ + + + + Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.loginResponse.datasource b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.loginResponse.datasource new file mode 100644 index 0000000..edbecd4 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.loginResponse.datasource @@ -0,0 +1,10 @@ + + + + Entelect.BattleCity.Challenge.ChallengeService.loginResponse, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionResponse.datasource b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionResponse.datasource new file mode 100644 index 0000000..4992e1b --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionResponse.datasource @@ -0,0 +1,10 @@ + + + + Entelect.BattleCity.Challenge.ChallengeService.setActionResponse, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse.datasource b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse.datasource new file mode 100644 index 0000000..4ea2b14 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse.datasource @@ -0,0 +1,10 @@ + + + + Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.state.datasource b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.state.datasource new file mode 100644 index 0000000..caa94f3 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.state.datasource @@ -0,0 +1,10 @@ + + + + Entelect.BattleCity.Challenge.ChallengeService.state, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.cs b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.cs new file mode 100644 index 0000000..f7fda50 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.cs @@ -0,0 +1,1104 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18051 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Entelect.BattleCity.Challenge.ChallengeService { + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class EndOfGameException : object, System.ComponentModel.INotifyPropertyChanged { + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class delta : object, System.ComponentModel.INotifyPropertyChanged { + + private long millisecondsToNextTickField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public long millisecondsToNextTick { + get { + return this.millisecondsToNextTickField; + } + set { + this.millisecondsToNextTickField = value; + this.RaisePropertyChanged("millisecondsToNextTick"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class @base : object, System.ComponentModel.INotifyPropertyChanged { + + private int xField; + + private int yField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public int x { + get { + return this.xField; + } + set { + this.xField = value; + this.RaisePropertyChanged("x"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] + public int y { + get { + return this.yField; + } + set { + this.yField = value; + this.RaisePropertyChanged("y"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class player : object, System.ComponentModel.INotifyPropertyChanged { + + private @base baseField; + + private bullet[] bulletsField; + + private string nameField; + + private unit[] unitsField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public @base @base { + get { + return this.baseField; + } + set { + this.baseField = value; + this.RaisePropertyChanged("base"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("bullets", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=1)] + public bullet[] bullets { + get { + return this.bulletsField; + } + set { + this.bulletsField = value; + this.RaisePropertyChanged("bullets"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] + public string name { + get { + return this.nameField; + } + set { + this.nameField = value; + this.RaisePropertyChanged("name"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("units", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=3)] + public unit[] units { + get { + return this.unitsField; + } + set { + this.unitsField = value; + this.RaisePropertyChanged("units"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class bullet : object, System.ComponentModel.INotifyPropertyChanged { + + private direction directionField; + + private bool directionFieldSpecified; + + private int idField; + + private int xField; + + private int yField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public direction direction { + get { + return this.directionField; + } + set { + this.directionField = value; + this.RaisePropertyChanged("direction"); + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool directionSpecified { + get { + return this.directionFieldSpecified; + } + set { + this.directionFieldSpecified = value; + this.RaisePropertyChanged("directionSpecified"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] + public int id { + get { + return this.idField; + } + set { + this.idField = value; + this.RaisePropertyChanged("id"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] + public int x { + get { + return this.xField; + } + set { + this.xField = value; + this.RaisePropertyChanged("x"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=3)] + public int y { + get { + return this.yField; + } + set { + this.yField = value; + this.RaisePropertyChanged("y"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public enum direction { + + /// + NONE, + + /// + UP, + + /// + DOWN, + + /// + LEFT, + + /// + RIGHT, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class unit : object, System.ComponentModel.INotifyPropertyChanged { + + private action actionField; + + private bool actionFieldSpecified; + + private direction directionField; + + private bool directionFieldSpecified; + + private int idField; + + private int xField; + + private int yField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public action action { + get { + return this.actionField; + } + set { + this.actionField = value; + this.RaisePropertyChanged("action"); + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool actionSpecified { + get { + return this.actionFieldSpecified; + } + set { + this.actionFieldSpecified = value; + this.RaisePropertyChanged("actionSpecified"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] + public direction direction { + get { + return this.directionField; + } + set { + this.directionField = value; + this.RaisePropertyChanged("direction"); + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool directionSpecified { + get { + return this.directionFieldSpecified; + } + set { + this.directionFieldSpecified = value; + this.RaisePropertyChanged("directionSpecified"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] + public int id { + get { + return this.idField; + } + set { + this.idField = value; + this.RaisePropertyChanged("id"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=3)] + public int x { + get { + return this.xField; + } + set { + this.xField = value; + this.RaisePropertyChanged("x"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=4)] + public int y { + get { + return this.yField; + } + set { + this.yField = value; + this.RaisePropertyChanged("y"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public enum action { + + /// + NONE, + + /// + UP, + + /// + DOWN, + + /// + LEFT, + + /// + RIGHT, + + /// + FIRE, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class unitEvent : object, System.ComponentModel.INotifyPropertyChanged { + + private bullet bulletField; + + private int tickTimeField; + + private unit unitField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public bullet bullet { + get { + return this.bulletField; + } + set { + this.bulletField = value; + this.RaisePropertyChanged("bullet"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] + public int tickTime { + get { + return this.tickTimeField; + } + set { + this.tickTimeField = value; + this.RaisePropertyChanged("tickTime"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] + public unit unit { + get { + return this.unitField; + } + set { + this.unitField = value; + this.RaisePropertyChanged("unit"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class point : object, System.ComponentModel.INotifyPropertyChanged { + + private int xField; + + private int yField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public int x { + get { + return this.xField; + } + set { + this.xField = value; + this.RaisePropertyChanged("x"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] + public int y { + get { + return this.yField; + } + set { + this.yField = value; + this.RaisePropertyChanged("y"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class blockEvent : object, System.ComponentModel.INotifyPropertyChanged { + + private state newStateField; + + private bool newStateFieldSpecified; + + private point pointField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public state newState { + get { + return this.newStateField; + } + set { + this.newStateField = value; + this.RaisePropertyChanged("newState"); + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool newStateSpecified { + get { + return this.newStateFieldSpecified; + } + set { + this.newStateFieldSpecified = value; + this.RaisePropertyChanged("newStateSpecified"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] + public point point { + get { + return this.pointField; + } + set { + this.pointField = value; + this.RaisePropertyChanged("point"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public enum state { + + /// + FULL, + + /// + EMPTY, + + /// + OUT_OF_BOUNDS, + + /// + NONE, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class events : object, System.ComponentModel.INotifyPropertyChanged { + + private blockEvent[] blockEventsField; + + private unitEvent[] unitEventsField; + + /// + [System.Xml.Serialization.XmlElementAttribute("blockEvents", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=0)] + public blockEvent[] blockEvents { + get { + return this.blockEventsField; + } + set { + this.blockEventsField = value; + this.RaisePropertyChanged("blockEvents"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("unitEvents", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=1)] + public unitEvent[] unitEvents { + get { + return this.unitEventsField; + } + set { + this.unitEventsField = value; + this.RaisePropertyChanged("unitEvents"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class game : object, System.ComponentModel.INotifyPropertyChanged { + + private int currentTickField; + + private events eventsField; + + private long millisecondsToNextTickField; + + private System.DateTime nextTickTimeField; + + private bool nextTickTimeFieldSpecified; + + private string playerNameField; + + private player[] playersField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public int currentTick { + get { + return this.currentTickField; + } + set { + this.currentTickField = value; + this.RaisePropertyChanged("currentTick"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] + public events events { + get { + return this.eventsField; + } + set { + this.eventsField = value; + this.RaisePropertyChanged("events"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] + public long millisecondsToNextTick { + get { + return this.millisecondsToNextTickField; + } + set { + this.millisecondsToNextTickField = value; + this.RaisePropertyChanged("millisecondsToNextTick"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=3)] + public System.DateTime nextTickTime { + get { + return this.nextTickTimeField; + } + set { + this.nextTickTimeField = value; + this.RaisePropertyChanged("nextTickTime"); + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool nextTickTimeSpecified { + get { + return this.nextTickTimeFieldSpecified; + } + set { + this.nextTickTimeFieldSpecified = value; + this.RaisePropertyChanged("nextTickTimeSpecified"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=4)] + public string playerName { + get { + return this.playerNameField; + } + set { + this.playerNameField = value; + this.RaisePropertyChanged("playerName"); + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("players", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=5)] + public player[] players { + get { + return this.playersField; + } + set { + this.playersField = value; + this.RaisePropertyChanged("players"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] + public partial class NoBlameException : object, System.ComponentModel.INotifyPropertyChanged { + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ServiceModel.ServiceContractAttribute(Namespace="http://challenge.entelect.co.za/", ConfigurationName="ChallengeService.Challenge")] + public interface Challenge { + + // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + [return: System.ServiceModel.MessageParameterAttribute(Name="return")] + Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse getStatus(Entelect.BattleCity.Challenge.ChallengeService.getStatus request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task getStatusAsync(Entelect.BattleCity.Challenge.ChallengeService.getStatus request); + + // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.FaultContractAttribute(typeof(Entelect.BattleCity.Challenge.ChallengeService.EndOfGameException), Action="", Name="EndOfGameException")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + [return: System.ServiceModel.MessageParameterAttribute(Name="return")] + Entelect.BattleCity.Challenge.ChallengeService.setActionResponse setAction(Entelect.BattleCity.Challenge.ChallengeService.setAction request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task setActionAsync(Entelect.BattleCity.Challenge.ChallengeService.setAction request); + + // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayAttribute'. + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.FaultContractAttribute(typeof(Entelect.BattleCity.Challenge.ChallengeService.NoBlameException), Action="", Name="NoBlameException")] + [System.ServiceModel.FaultContractAttribute(typeof(Entelect.BattleCity.Challenge.ChallengeService.EndOfGameException), Action="", Name="EndOfGameException")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + [return: System.ServiceModel.MessageParameterAttribute(Name="return")] + Entelect.BattleCity.Challenge.ChallengeService.loginResponse login(Entelect.BattleCity.Challenge.ChallengeService.login request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task loginAsync(Entelect.BattleCity.Challenge.ChallengeService.login request); + + // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.FaultContractAttribute(typeof(Entelect.BattleCity.Challenge.ChallengeService.EndOfGameException), Action="", Name="EndOfGameException")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + [return: System.ServiceModel.MessageParameterAttribute(Name="return")] + Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse setActions(Entelect.BattleCity.Challenge.ChallengeService.setActions request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task setActionsAsync(Entelect.BattleCity.Challenge.ChallengeService.setActions request); + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="getStatus", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] + public partial class getStatus { + + public getStatus() { + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="getStatusResponse", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] + public partial class getStatusResponse { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Entelect.BattleCity.Challenge.ChallengeService.game @return; + + public getStatusResponse() { + } + + public getStatusResponse(Entelect.BattleCity.Challenge.ChallengeService.game @return) { + this.@return = @return; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="setAction", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] + public partial class setAction { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public int arg0; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Entelect.BattleCity.Challenge.ChallengeService.action arg1; + + public setAction() { + } + + public setAction(int arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { + this.arg0 = arg0; + this.arg1 = arg1; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="setActionResponse", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] + public partial class setActionResponse { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Entelect.BattleCity.Challenge.ChallengeService.delta @return; + + public setActionResponse() { + } + + public setActionResponse(Entelect.BattleCity.Challenge.ChallengeService.delta @return) { + this.@return = @return; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="login", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] + public partial class login { + + public login() { + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="loginResponse", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] + public partial class loginResponse { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("states", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("item", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, NestingLevel=1)] + public System.Nullable[][] @return; + + public loginResponse() { + } + + public loginResponse(System.Nullable[][] @return) { + this.@return = @return; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="setActions", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] + public partial class setActions { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Entelect.BattleCity.Challenge.ChallengeService.action arg0; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Entelect.BattleCity.Challenge.ChallengeService.action arg1; + + public setActions() { + } + + public setActions(Entelect.BattleCity.Challenge.ChallengeService.action arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { + this.arg0 = arg0; + this.arg1 = arg1; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="setActionsResponse", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] + public partial class setActionsResponse { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Entelect.BattleCity.Challenge.ChallengeService.delta @return; + + public setActionsResponse() { + } + + public setActionsResponse(Entelect.BattleCity.Challenge.ChallengeService.delta @return) { + this.@return = @return; + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + public interface ChallengeChannel : Entelect.BattleCity.Challenge.ChallengeService.Challenge, System.ServiceModel.IClientChannel { + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + public partial class ChallengeClient : System.ServiceModel.ClientBase, Entelect.BattleCity.Challenge.ChallengeService.Challenge { + + public ChallengeClient() { + } + + public ChallengeClient(string endpointConfigurationName) : + base(endpointConfigurationName) { + } + + public ChallengeClient(string endpointConfigurationName, string remoteAddress) : + base(endpointConfigurationName, remoteAddress) { + } + + public ChallengeClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : + base(endpointConfigurationName, remoteAddress) { + } + + public ChallengeClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) { + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse Entelect.BattleCity.Challenge.ChallengeService.Challenge.getStatus(Entelect.BattleCity.Challenge.ChallengeService.getStatus request) { + return base.Channel.getStatus(request); + } + + public Entelect.BattleCity.Challenge.ChallengeService.game getStatus() { + Entelect.BattleCity.Challenge.ChallengeService.getStatus inValue = new Entelect.BattleCity.Challenge.ChallengeService.getStatus(); + Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse retVal = ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).getStatus(inValue); + return retVal.@return; + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task Entelect.BattleCity.Challenge.ChallengeService.Challenge.getStatusAsync(Entelect.BattleCity.Challenge.ChallengeService.getStatus request) { + return base.Channel.getStatusAsync(request); + } + + public System.Threading.Tasks.Task getStatusAsync() { + Entelect.BattleCity.Challenge.ChallengeService.getStatus inValue = new Entelect.BattleCity.Challenge.ChallengeService.getStatus(); + return ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).getStatusAsync(inValue); + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + Entelect.BattleCity.Challenge.ChallengeService.setActionResponse Entelect.BattleCity.Challenge.ChallengeService.Challenge.setAction(Entelect.BattleCity.Challenge.ChallengeService.setAction request) { + return base.Channel.setAction(request); + } + + public Entelect.BattleCity.Challenge.ChallengeService.delta setAction(int arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { + Entelect.BattleCity.Challenge.ChallengeService.setAction inValue = new Entelect.BattleCity.Challenge.ChallengeService.setAction(); + inValue.arg0 = arg0; + inValue.arg1 = arg1; + Entelect.BattleCity.Challenge.ChallengeService.setActionResponse retVal = ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).setAction(inValue); + return retVal.@return; + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task Entelect.BattleCity.Challenge.ChallengeService.Challenge.setActionAsync(Entelect.BattleCity.Challenge.ChallengeService.setAction request) { + return base.Channel.setActionAsync(request); + } + + public System.Threading.Tasks.Task setActionAsync(int arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { + Entelect.BattleCity.Challenge.ChallengeService.setAction inValue = new Entelect.BattleCity.Challenge.ChallengeService.setAction(); + inValue.arg0 = arg0; + inValue.arg1 = arg1; + return ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).setActionAsync(inValue); + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + Entelect.BattleCity.Challenge.ChallengeService.loginResponse Entelect.BattleCity.Challenge.ChallengeService.Challenge.login(Entelect.BattleCity.Challenge.ChallengeService.login request) { + return base.Channel.login(request); + } + + public System.Nullable[][] login() { + Entelect.BattleCity.Challenge.ChallengeService.login inValue = new Entelect.BattleCity.Challenge.ChallengeService.login(); + Entelect.BattleCity.Challenge.ChallengeService.loginResponse retVal = ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).login(inValue); + return retVal.@return; + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task Entelect.BattleCity.Challenge.ChallengeService.Challenge.loginAsync(Entelect.BattleCity.Challenge.ChallengeService.login request) { + return base.Channel.loginAsync(request); + } + + public System.Threading.Tasks.Task loginAsync() { + Entelect.BattleCity.Challenge.ChallengeService.login inValue = new Entelect.BattleCity.Challenge.ChallengeService.login(); + return ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).loginAsync(inValue); + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse Entelect.BattleCity.Challenge.ChallengeService.Challenge.setActions(Entelect.BattleCity.Challenge.ChallengeService.setActions request) { + return base.Channel.setActions(request); + } + + public Entelect.BattleCity.Challenge.ChallengeService.delta setActions(Entelect.BattleCity.Challenge.ChallengeService.action arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { + Entelect.BattleCity.Challenge.ChallengeService.setActions inValue = new Entelect.BattleCity.Challenge.ChallengeService.setActions(); + inValue.arg0 = arg0; + inValue.arg1 = arg1; + Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse retVal = ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).setActions(inValue); + return retVal.@return; + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task Entelect.BattleCity.Challenge.ChallengeService.Challenge.setActionsAsync(Entelect.BattleCity.Challenge.ChallengeService.setActions request) { + return base.Channel.setActionsAsync(request); + } + + public System.Threading.Tasks.Task setActionsAsync(Entelect.BattleCity.Challenge.ChallengeService.action arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { + Entelect.BattleCity.Challenge.ChallengeService.setActions inValue = new Entelect.BattleCity.Challenge.ChallengeService.setActions(); + inValue.arg0 = arg0; + inValue.arg1 = arg1; + return ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).setActionsAsync(inValue); + } + } +} diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.svcmap b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.svcmap new file mode 100644 index 0000000..8cd1468 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.svcmap @@ -0,0 +1,31 @@ + + + + false + true + true + + false + false + false + + + true + Auto + true + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration.svcinfo b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration.svcinfo new file mode 100644 index 0000000..6bbf9a9 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration.svcinfo @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration91.svcinfo b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration91.svcinfo new file mode 100644 index 0000000..fea37b0 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration91.svcinfo @@ -0,0 +1,201 @@ + + + + + + + ChallengeServiceSoapBinding + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + None + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + + + http://localhost:9090/ChallengePort + + + + + + basicHttpBinding + + + ChallengeServiceSoapBinding + + + ChallengeService.Challenge + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + ChallengePort + + + + + + + + + + + \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/compile.bat b/2013-battlecity/Entelect.BattleCity.Challenge/compile.bat new file mode 100644 index 0000000..4f3d152 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/compile.bat @@ -0,0 +1 @@ +MSBuild.exe /property:Configuration=Release Entelect.BattleCity.Challenge.csproj \ No newline at end of file diff --git a/2013-battlecity/Entelect.BattleCity.Challenge/start.bat b/2013-battlecity/Entelect.BattleCity.Challenge/start.bat new file mode 100644 index 0000000..521c376 --- /dev/null +++ b/2013-battlecity/Entelect.BattleCity.Challenge/start.bat @@ -0,0 +1 @@ +"bin/Release/Entelect.BattleCity.Challenge.exe" %1 \ No newline at end of file diff --git a/2013-battlecity/README.md b/2013-battlecity/README.md new file mode 100644 index 0000000..e868ec0 --- /dev/null +++ b/2013-battlecity/README.md @@ -0,0 +1,12 @@ +Botinator +========= + +My entry for the Entelect 100k Challenge 2013. + +The task for the 2013 100k challenge was to write a program which connects to a SOAP web service and controls the tanks in a game of Battle City. Each player has two tanks and a base on a two dimensional board. The player who manages to destroy their opponent's base first wins. + +I'm currently employed by Entelect, so I could not enter the 100k challenge, but we did have an internal version of the challenge. This bot came second in the internal challenge. + +This is an intentionally 'stupid' bot. It doesn't use any fancy AI algorithms, and doesn't really even look at what is happening. Despite being pretty stupid, it actually works fairly well. + +The core of the algorithm is that each tank compares its position to that of the enemy base. If it is in line with the base horizontally, it faces the base. If it is not in line with the base, it faces in the direction it would need to head to be in line with the base. If the tank can shoot, it shoots. If it can't shoot, it moves forward. I find it easiest to visualise this as an 'L' pattern. diff --git a/Entelect.BattleCity.Challenge.sln b/Entelect.BattleCity.Challenge.sln deleted file mode 100644 index 2b5f5ea..0000000 --- a/Entelect.BattleCity.Challenge.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Entelect.BattleCity.Challenge", "Entelect.BattleCity.Challenge\Entelect.BattleCity.Challenge.csproj", "{B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Entelect.BattleCity.Challenge/AiAgent.cs b/Entelect.BattleCity.Challenge/AiAgent.cs deleted file mode 100644 index a1ca0e5..0000000 --- a/Entelect.BattleCity.Challenge/AiAgent.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Entelect.BattleCity.Challenge -{ - class AiAgent - { - private int? _lastX; - private int? _lastY; - private ChallengeService.action _lastAction; - private bool _hasShotFromLastPosition; - - private int _tankId; - - private int? _targetX; - - private bool _checkForOpenPathToMiddle; - private bool _headingToMiddle; - - public AiAgent(int tankId, bool checkForOpenPathToMiddle) - { - _tankId = tankId; - _checkForOpenPathToMiddle = checkForOpenPathToMiddle; - _lastAction = ChallengeService.action.NONE; - _hasShotFromLastPosition = false; - _headingToMiddle = false; - } - - public Move GetBestMove(ChallengeService.game game, BoardCell[][] board, ChallengeService.player me, ChallengeService.player enemy) - { - Move move = null; - ChallengeService.unit tank = findTankInPlayer(_tankId, me); - - if (tank == null) - { - return null; - } - - if (tank.x != _lastX || tank.y != _lastY) - { - _hasShotFromLastPosition = false; - } - - var bulletInAir = checkIsBulletInAir(board, me, tank); - var stuckLastTurn = checkStuckLastTurn(tank); - - var enemyBase = enemy.@base; - - var pastMidpoint = (Math.Abs(enemyBase.y-tank.y) < (board[0].Length / 2)); - - if (stuckLastTurn && (tank.direction == ChallengeService.direction.UP || tank.direction == ChallengeService.direction.DOWN) && enemyBase.x != tank.x) - { - _targetX = tank.x + (pastMidpoint!=(tank.x > enemyBase.x) ? +1 : -1); - } - - if (_checkForOpenPathToMiddle && !_headingToMiddle && tank.x != enemyBase.x) - { - _headingToMiddle = testPathToMiddleIsOpen(board, tank, enemyBase); - } - else if (_checkForOpenPathToMiddle && _headingToMiddle && tank.x == enemyBase.x) - { - _headingToMiddle = false; - } - - - ChallengeService.direction chosenDirection = - _headingToMiddle ? - ( - tank.x > enemyBase.x ? - ChallengeService.direction.LEFT : - ChallengeService.direction.RIGHT - ) : - ( - tank.y != enemyBase.y ? - ( - _targetX.HasValue && _targetX != tank.x ? - ( - tank.x > _targetX ? - ChallengeService.direction.LEFT : - ChallengeService.direction.RIGHT - ) : - ( - tank.y > enemyBase.y ? - ChallengeService.direction.UP : - ChallengeService.direction.DOWN - ) - ) : - ( - tank.x > enemyBase.x ? - ChallengeService.direction.LEFT : - ChallengeService.direction.RIGHT - ) - ); - - if (chosenDirection != tank.direction || bulletInAir || _headingToMiddle) - { - move = MoveInDirection(tank.id, chosenDirection); - } - else - { - move = new Move(tank.id, ChallengeService.action.FIRE); - _hasShotFromLastPosition = true; - } - - _lastX = tank.x; - _lastY = tank.y; - _lastAction = move.Action; - - return move; - } - - private bool testPathToMiddleIsOpen(BoardCell[][] board, ChallengeService.unit tank, ChallengeService.@base enemyBase) - { - var minY = tank.y - 2; - var maxY = tank.y + 2; - var minX = Math.Min(tank.x, enemyBase.x)-2; - var maxX = Math.Max(tank.x, enemyBase.x)+2; - - bool insideRange = board.Length > maxX && board[maxX].Length > maxY && 0 <= minX && 0 <= minY; - if (!insideRange) - { - return false; - } - - for (int x = minX; x <= maxX; ++x) - { - for (int y = minY; y <= maxY; ++y) - { - if (board[x][y] != BoardCell.EMPTY) - { - return false; - } - - } - } - - return true; - } - - private ChallengeService.unit findTankInPlayer(int tankId, ChallengeService.player me) - { - if (me != null && me.units != null) - { - foreach (var unit in me.units) - { - if (unit.id == _tankId) - { - return unit; - } - } - } - return null; - } - - public Move MoveInDirection(int tankId, ChallengeService.direction direction) - { - switch (direction) - { - case ChallengeService.direction.UP: - return new Move(tankId, ChallengeService.action.UP); - case ChallengeService.direction.DOWN: - return new Move(tankId, ChallengeService.action.DOWN); - case ChallengeService.direction.LEFT: - return new Move(tankId, ChallengeService.action.LEFT); - case ChallengeService.direction.RIGHT: - return new Move(tankId, ChallengeService.action.RIGHT); - default: - return new Move(tankId, ChallengeService.action.NONE); - } - } - - private bool checkIsBulletInAir(BoardCell[][] board, ChallengeService.player me, ChallengeService.unit tank) - { - var bulletInAir = false; - if (me.bullets != null) - { - foreach (var bullet in me.bullets) - { - if (Math.Abs(bullet.x - tank.x) < board.Length / 6) - { - bulletInAir = true; - } - } - } - - return bulletInAir; - } - - private bool checkStuckLastTurn(ChallengeService.unit tank) - { - return !(_lastAction == ChallengeService.action.FIRE || _lastAction == ChallengeService.action.NONE) - && tank.x == _lastX && tank.y == _lastY - && _hasShotFromLastPosition; - } - } -} diff --git a/Entelect.BattleCity.Challenge/App.config b/Entelect.BattleCity.Challenge/App.config deleted file mode 100644 index ef162fd..0000000 --- a/Entelect.BattleCity.Challenge/App.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/BoardCell.cs b/Entelect.BattleCity.Challenge/BoardCell.cs deleted file mode 100644 index bd7063e..0000000 --- a/Entelect.BattleCity.Challenge/BoardCell.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Entelect.BattleCity.Challenge -{ - public enum BoardCell - { - EMPTY, - WALL, - BASE, - OUT_OF_BOUNDS - } -} diff --git a/Entelect.BattleCity.Challenge/Entelect.BattleCity.Challenge.csproj b/Entelect.BattleCity.Challenge/Entelect.BattleCity.Challenge.csproj deleted file mode 100644 index 0a8cb97..0000000 --- a/Entelect.BattleCity.Challenge/Entelect.BattleCity.Challenge.csproj +++ /dev/null @@ -1,109 +0,0 @@ - - - - - Debug - AnyCPU - {B9BDD8BB-6AB8-47A9-810C-F689C5CE3259} - Exe - Properties - Entelect.BattleCity.Challenge - Entelect.BattleCity.Challenge - v4.5 - 512 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - True - True - Reference.svcmap - - - - - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - - - - - - - - - - - - - - - WCF Proxy Generator - Reference.cs - - - - - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/GameInProgress.cs b/Entelect.BattleCity.Challenge/GameInProgress.cs deleted file mode 100644 index 23a6550..0000000 --- a/Entelect.BattleCity.Challenge/GameInProgress.cs +++ /dev/null @@ -1,157 +0,0 @@ -using System; -using System.Windows; -using System.Collections.Generic; -using System.Threading; -using System.Diagnostics; -using System.Text; - -namespace Entelect.BattleCity.Challenge -{ - public class GameInProgress - { - private static ChallengeService.action _nullAction = ChallengeService.action.NONE; - - private ChallengeService.ChallengeClient _service; - private ChallengeService.game _currentState; - private ChallengeService.player _me; - private ChallengeService.player _enemy; - - private BoardCell[][] _board; - - private AiAgent _tank1Ai; - private AiAgent _tank2Ai; - - private Stopwatch _stepTimer; - - public GameInProgress(ChallengeService.ChallengeClient service, ChallengeService.state?[][] board) - { - _service = service; - _board = getBoardCellArrayFromServiceStates(board); - - updateGameStatus(true); - _board[_me.@base.x][_me.@base.y] = BoardCell.BASE; - _board[_enemy.@base.x][_enemy.@base.y] = BoardCell.BASE; - - _tank1Ai = new AiAgent(_me.units[0].id, false); - _tank2Ai = new AiAgent(_me.units[1].id, true); - } - - - - public void run() - { - while (true) - { - if (_currentState.millisecondsToNextTick-_stepTimer.ElapsedMilliseconds < 0) - { - updateGameStatus(); - continue; - } - makeNextMove(); - waitForNextTick(); - - updateGameStatus(); - } - } - - private void makeNextMove() - { - Move tank1Move = _tank1Ai.GetBestMove(_currentState, _board, _me, _enemy); - Move tank2Move = _tank2Ai.GetBestMove(_currentState, _board, _me, _enemy); - - sendMovesToService(tank1Move, tank2Move); - } - - private void sendMovesToService(Move tank1Move, Move tank2Move) - { - if (tank1Move != null && tank2Move != null) - { - _service.setActions(tank1Move.Action, tank2Move.Action); - } - else if (tank1Move != null) - { - _service.setAction(tank1Move.Tank, tank1Move.Action); - } - else if (tank2Move != null) - { - _service.setAction(tank2Move.Tank, tank2Move.Action); - } - } - - private void waitForNextTick() - { - var sleepTime = TimeSpan.FromMilliseconds(_currentState.millisecondsToNextTick-_stepTimer.ElapsedMilliseconds+500); - if (sleepTime.Ticks > 0L) - { - try - { - Thread.Sleep(sleepTime); - } - catch (Exception ex) - { - } - } - } - - private void updateGameStatus(bool firstTime = false) - { - if (firstTime) - { - _currentState = _service.getStatus(); - } - else - { - var previousTick = _currentState.currentTick; - while (previousTick == _currentState.currentTick) - { - _currentState = _service.getStatus(); - } - } - _stepTimer = Stopwatch.StartNew(); - - foreach (ChallengeService.player player in _currentState.players) - { - if (player.name.Equals(_currentState.playerName)) - { - _me = player; - } - else - { - _enemy = player; - } - } - } - - private BoardCell[][] getBoardCellArrayFromServiceStates(ChallengeService.state?[][] stateBoard) - { - BoardCell[][] newBoard = new BoardCell[stateBoard.Length][]; - for (int x = 0; x < stateBoard.Length; ++x) - { - newBoard[x] = new BoardCell[stateBoard[x].Length]; - for (int y = 0; y < stateBoard[x].Length; ++y) - { - switch (stateBoard[x][y]) - { - case null: - case ChallengeService.state.NONE: - case ChallengeService.state.EMPTY: - newBoard[x][y] = BoardCell.EMPTY; - break; - case ChallengeService.state.FULL: - newBoard[x][y] = BoardCell.WALL; - break; - case ChallengeService.state.OUT_OF_BOUNDS: - newBoard[x][y] = BoardCell.OUT_OF_BOUNDS; - break; - default: - newBoard[x][y] = BoardCell.OUT_OF_BOUNDS; - break; - } - - } - } - - return newBoard; - } - } -} diff --git a/Entelect.BattleCity.Challenge/Move.cs b/Entelect.BattleCity.Challenge/Move.cs deleted file mode 100644 index 7fba664..0000000 --- a/Entelect.BattleCity.Challenge/Move.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Entelect.BattleCity.Challenge -{ - class Move - { - public int Tank { get; private set; } - public ChallengeService.action Action { get; private set; } - - public Move(int tank, ChallengeService.action action) - { - Tank = tank; - Action = action; - } - - public override string ToString() - { - return string.Format("Tank {0}: {1}", Tank, Action.ToString()); - } - } -} diff --git a/Entelect.BattleCity.Challenge/Program.cs b/Entelect.BattleCity.Challenge/Program.cs deleted file mode 100644 index 376807a..0000000 --- a/Entelect.BattleCity.Challenge/Program.cs +++ /dev/null @@ -1,27 +0,0 @@ -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()); - } - } - } -} diff --git a/Entelect.BattleCity.Challenge/Properties/AssemblyInfo.cs b/Entelect.BattleCity.Challenge/Properties/AssemblyInfo.cs deleted file mode 100644 index 97397b4..0000000 --- a/Entelect.BattleCity.Challenge/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Entelect.BattleCity.Challenge")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Entelect.BattleCity.Challenge")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8e9e513d-3232-4b92-83dd-13ec54131857")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/ChallengeService.wsdl b/Entelect.BattleCity.Challenge/Service References/ChallengeService/ChallengeService.wsdl deleted file mode 100644 index 0d7d4a9..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/ChallengeService.wsdl +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.delta.datasource b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.delta.datasource deleted file mode 100644 index ba30593..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.delta.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - Entelect.BattleCity.Challenge.ChallengeService.delta, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.game.datasource b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.game.datasource deleted file mode 100644 index 295ea08..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.game.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - Entelect.BattleCity.Challenge.ChallengeService.game, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse.datasource b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse.datasource deleted file mode 100644 index 6701b3e..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.loginResponse.datasource b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.loginResponse.datasource deleted file mode 100644 index edbecd4..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.loginResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - Entelect.BattleCity.Challenge.ChallengeService.loginResponse, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionResponse.datasource b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionResponse.datasource deleted file mode 100644 index 4992e1b..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - Entelect.BattleCity.Challenge.ChallengeService.setActionResponse, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse.datasource b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse.datasource deleted file mode 100644 index 4ea2b14..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.state.datasource b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.state.datasource deleted file mode 100644 index caa94f3..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Entelect.BattleCity.Challenge.ChallengeService.state.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - Entelect.BattleCity.Challenge.ChallengeService.state, Service References.ChallengeService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.cs b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.cs deleted file mode 100644 index f7fda50..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.cs +++ /dev/null @@ -1,1104 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.18051 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Entelect.BattleCity.Challenge.ChallengeService { - - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class EndOfGameException : object, System.ComponentModel.INotifyPropertyChanged { - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class delta : object, System.ComponentModel.INotifyPropertyChanged { - - private long millisecondsToNextTickField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public long millisecondsToNextTick { - get { - return this.millisecondsToNextTickField; - } - set { - this.millisecondsToNextTickField = value; - this.RaisePropertyChanged("millisecondsToNextTick"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class @base : object, System.ComponentModel.INotifyPropertyChanged { - - private int xField; - - private int yField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public int x { - get { - return this.xField; - } - set { - this.xField = value; - this.RaisePropertyChanged("x"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] - public int y { - get { - return this.yField; - } - set { - this.yField = value; - this.RaisePropertyChanged("y"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class player : object, System.ComponentModel.INotifyPropertyChanged { - - private @base baseField; - - private bullet[] bulletsField; - - private string nameField; - - private unit[] unitsField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public @base @base { - get { - return this.baseField; - } - set { - this.baseField = value; - this.RaisePropertyChanged("base"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute("bullets", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=1)] - public bullet[] bullets { - get { - return this.bulletsField; - } - set { - this.bulletsField = value; - this.RaisePropertyChanged("bullets"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] - public string name { - get { - return this.nameField; - } - set { - this.nameField = value; - this.RaisePropertyChanged("name"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute("units", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=3)] - public unit[] units { - get { - return this.unitsField; - } - set { - this.unitsField = value; - this.RaisePropertyChanged("units"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class bullet : object, System.ComponentModel.INotifyPropertyChanged { - - private direction directionField; - - private bool directionFieldSpecified; - - private int idField; - - private int xField; - - private int yField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public direction direction { - get { - return this.directionField; - } - set { - this.directionField = value; - this.RaisePropertyChanged("direction"); - } - } - - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - public bool directionSpecified { - get { - return this.directionFieldSpecified; - } - set { - this.directionFieldSpecified = value; - this.RaisePropertyChanged("directionSpecified"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] - public int id { - get { - return this.idField; - } - set { - this.idField = value; - this.RaisePropertyChanged("id"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] - public int x { - get { - return this.xField; - } - set { - this.xField = value; - this.RaisePropertyChanged("x"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=3)] - public int y { - get { - return this.yField; - } - set { - this.yField = value; - this.RaisePropertyChanged("y"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public enum direction { - - /// - NONE, - - /// - UP, - - /// - DOWN, - - /// - LEFT, - - /// - RIGHT, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class unit : object, System.ComponentModel.INotifyPropertyChanged { - - private action actionField; - - private bool actionFieldSpecified; - - private direction directionField; - - private bool directionFieldSpecified; - - private int idField; - - private int xField; - - private int yField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public action action { - get { - return this.actionField; - } - set { - this.actionField = value; - this.RaisePropertyChanged("action"); - } - } - - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - public bool actionSpecified { - get { - return this.actionFieldSpecified; - } - set { - this.actionFieldSpecified = value; - this.RaisePropertyChanged("actionSpecified"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] - public direction direction { - get { - return this.directionField; - } - set { - this.directionField = value; - this.RaisePropertyChanged("direction"); - } - } - - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - public bool directionSpecified { - get { - return this.directionFieldSpecified; - } - set { - this.directionFieldSpecified = value; - this.RaisePropertyChanged("directionSpecified"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] - public int id { - get { - return this.idField; - } - set { - this.idField = value; - this.RaisePropertyChanged("id"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=3)] - public int x { - get { - return this.xField; - } - set { - this.xField = value; - this.RaisePropertyChanged("x"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=4)] - public int y { - get { - return this.yField; - } - set { - this.yField = value; - this.RaisePropertyChanged("y"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public enum action { - - /// - NONE, - - /// - UP, - - /// - DOWN, - - /// - LEFT, - - /// - RIGHT, - - /// - FIRE, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class unitEvent : object, System.ComponentModel.INotifyPropertyChanged { - - private bullet bulletField; - - private int tickTimeField; - - private unit unitField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public bullet bullet { - get { - return this.bulletField; - } - set { - this.bulletField = value; - this.RaisePropertyChanged("bullet"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] - public int tickTime { - get { - return this.tickTimeField; - } - set { - this.tickTimeField = value; - this.RaisePropertyChanged("tickTime"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] - public unit unit { - get { - return this.unitField; - } - set { - this.unitField = value; - this.RaisePropertyChanged("unit"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class point : object, System.ComponentModel.INotifyPropertyChanged { - - private int xField; - - private int yField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public int x { - get { - return this.xField; - } - set { - this.xField = value; - this.RaisePropertyChanged("x"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] - public int y { - get { - return this.yField; - } - set { - this.yField = value; - this.RaisePropertyChanged("y"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class blockEvent : object, System.ComponentModel.INotifyPropertyChanged { - - private state newStateField; - - private bool newStateFieldSpecified; - - private point pointField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public state newState { - get { - return this.newStateField; - } - set { - this.newStateField = value; - this.RaisePropertyChanged("newState"); - } - } - - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - public bool newStateSpecified { - get { - return this.newStateFieldSpecified; - } - set { - this.newStateFieldSpecified = value; - this.RaisePropertyChanged("newStateSpecified"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] - public point point { - get { - return this.pointField; - } - set { - this.pointField = value; - this.RaisePropertyChanged("point"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public enum state { - - /// - FULL, - - /// - EMPTY, - - /// - OUT_OF_BOUNDS, - - /// - NONE, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class events : object, System.ComponentModel.INotifyPropertyChanged { - - private blockEvent[] blockEventsField; - - private unitEvent[] unitEventsField; - - /// - [System.Xml.Serialization.XmlElementAttribute("blockEvents", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=0)] - public blockEvent[] blockEvents { - get { - return this.blockEventsField; - } - set { - this.blockEventsField = value; - this.RaisePropertyChanged("blockEvents"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute("unitEvents", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=1)] - public unitEvent[] unitEvents { - get { - return this.unitEventsField; - } - set { - this.unitEventsField = value; - this.RaisePropertyChanged("unitEvents"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class game : object, System.ComponentModel.INotifyPropertyChanged { - - private int currentTickField; - - private events eventsField; - - private long millisecondsToNextTickField; - - private System.DateTime nextTickTimeField; - - private bool nextTickTimeFieldSpecified; - - private string playerNameField; - - private player[] playersField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] - public int currentTick { - get { - return this.currentTickField; - } - set { - this.currentTickField = value; - this.RaisePropertyChanged("currentTick"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] - public events events { - get { - return this.eventsField; - } - set { - this.eventsField = value; - this.RaisePropertyChanged("events"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=2)] - public long millisecondsToNextTick { - get { - return this.millisecondsToNextTickField; - } - set { - this.millisecondsToNextTickField = value; - this.RaisePropertyChanged("millisecondsToNextTick"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=3)] - public System.DateTime nextTickTime { - get { - return this.nextTickTimeField; - } - set { - this.nextTickTimeField = value; - this.RaisePropertyChanged("nextTickTime"); - } - } - - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - public bool nextTickTimeSpecified { - get { - return this.nextTickTimeFieldSpecified; - } - set { - this.nextTickTimeFieldSpecified = value; - this.RaisePropertyChanged("nextTickTimeSpecified"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=4)] - public string playerName { - get { - return this.playerNameField; - } - set { - this.playerNameField = value; - this.RaisePropertyChanged("playerName"); - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute("players", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=5)] - public player[] players { - get { - return this.playersField; - } - set { - this.playersField = value; - this.RaisePropertyChanged("players"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18053")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://challenge.entelect.co.za/")] - public partial class NoBlameException : object, System.ComponentModel.INotifyPropertyChanged { - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected void RaisePropertyChanged(string propertyName) { - System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; - if ((propertyChanged != null)) { - propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace="http://challenge.entelect.co.za/", ConfigurationName="ChallengeService.Challenge")] - public interface Challenge { - - // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] - [return: System.ServiceModel.MessageParameterAttribute(Name="return")] - Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse getStatus(Entelect.BattleCity.Challenge.ChallengeService.getStatus request); - - [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] - System.Threading.Tasks.Task getStatusAsync(Entelect.BattleCity.Challenge.ChallengeService.getStatus request); - - // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] - [System.ServiceModel.FaultContractAttribute(typeof(Entelect.BattleCity.Challenge.ChallengeService.EndOfGameException), Action="", Name="EndOfGameException")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] - [return: System.ServiceModel.MessageParameterAttribute(Name="return")] - Entelect.BattleCity.Challenge.ChallengeService.setActionResponse setAction(Entelect.BattleCity.Challenge.ChallengeService.setAction request); - - [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] - System.Threading.Tasks.Task setActionAsync(Entelect.BattleCity.Challenge.ChallengeService.setAction request); - - // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayAttribute'. - [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] - [System.ServiceModel.FaultContractAttribute(typeof(Entelect.BattleCity.Challenge.ChallengeService.NoBlameException), Action="", Name="NoBlameException")] - [System.ServiceModel.FaultContractAttribute(typeof(Entelect.BattleCity.Challenge.ChallengeService.EndOfGameException), Action="", Name="EndOfGameException")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] - [return: System.ServiceModel.MessageParameterAttribute(Name="return")] - Entelect.BattleCity.Challenge.ChallengeService.loginResponse login(Entelect.BattleCity.Challenge.ChallengeService.login request); - - [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] - System.Threading.Tasks.Task loginAsync(Entelect.BattleCity.Challenge.ChallengeService.login request); - - // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] - [System.ServiceModel.FaultContractAttribute(typeof(Entelect.BattleCity.Challenge.ChallengeService.EndOfGameException), Action="", Name="EndOfGameException")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] - [return: System.ServiceModel.MessageParameterAttribute(Name="return")] - Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse setActions(Entelect.BattleCity.Challenge.ChallengeService.setActions request); - - [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] - System.Threading.Tasks.Task setActionsAsync(Entelect.BattleCity.Challenge.ChallengeService.setActions request); - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="getStatus", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] - public partial class getStatus { - - public getStatus() { - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="getStatusResponse", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] - public partial class getStatusResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - public Entelect.BattleCity.Challenge.ChallengeService.game @return; - - public getStatusResponse() { - } - - public getStatusResponse(Entelect.BattleCity.Challenge.ChallengeService.game @return) { - this.@return = @return; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="setAction", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] - public partial class setAction { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - public int arg0; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=1)] - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - public Entelect.BattleCity.Challenge.ChallengeService.action arg1; - - public setAction() { - } - - public setAction(int arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { - this.arg0 = arg0; - this.arg1 = arg1; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="setActionResponse", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] - public partial class setActionResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - public Entelect.BattleCity.Challenge.ChallengeService.delta @return; - - public setActionResponse() { - } - - public setActionResponse(Entelect.BattleCity.Challenge.ChallengeService.delta @return) { - this.@return = @return; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="login", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] - public partial class login { - - public login() { - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="loginResponse", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] - public partial class loginResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] - [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - [System.Xml.Serialization.XmlArrayItemAttribute("states", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - [System.Xml.Serialization.XmlArrayItemAttribute("item", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, NestingLevel=1)] - public System.Nullable[][] @return; - - public loginResponse() { - } - - public loginResponse(System.Nullable[][] @return) { - this.@return = @return; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="setActions", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] - public partial class setActions { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - public Entelect.BattleCity.Challenge.ChallengeService.action arg0; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=1)] - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - public Entelect.BattleCity.Challenge.ChallengeService.action arg1; - - public setActions() { - } - - public setActions(Entelect.BattleCity.Challenge.ChallengeService.action arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { - this.arg0 = arg0; - this.arg1 = arg1; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="setActionsResponse", WrapperNamespace="http://challenge.entelect.co.za/", IsWrapped=true)] - public partial class setActionsResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://challenge.entelect.co.za/", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] - public Entelect.BattleCity.Challenge.ChallengeService.delta @return; - - public setActionsResponse() { - } - - public setActionsResponse(Entelect.BattleCity.Challenge.ChallengeService.delta @return) { - this.@return = @return; - } - } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface ChallengeChannel : Entelect.BattleCity.Challenge.ChallengeService.Challenge, System.ServiceModel.IClientChannel { - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class ChallengeClient : System.ServiceModel.ClientBase, Entelect.BattleCity.Challenge.ChallengeService.Challenge { - - public ChallengeClient() { - } - - public ChallengeClient(string endpointConfigurationName) : - base(endpointConfigurationName) { - } - - public ChallengeClient(string endpointConfigurationName, string remoteAddress) : - base(endpointConfigurationName, remoteAddress) { - } - - public ChallengeClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : - base(endpointConfigurationName, remoteAddress) { - } - - public ChallengeClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : - base(binding, remoteAddress) { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse Entelect.BattleCity.Challenge.ChallengeService.Challenge.getStatus(Entelect.BattleCity.Challenge.ChallengeService.getStatus request) { - return base.Channel.getStatus(request); - } - - public Entelect.BattleCity.Challenge.ChallengeService.game getStatus() { - Entelect.BattleCity.Challenge.ChallengeService.getStatus inValue = new Entelect.BattleCity.Challenge.ChallengeService.getStatus(); - Entelect.BattleCity.Challenge.ChallengeService.getStatusResponse retVal = ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).getStatus(inValue); - return retVal.@return; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Entelect.BattleCity.Challenge.ChallengeService.Challenge.getStatusAsync(Entelect.BattleCity.Challenge.ChallengeService.getStatus request) { - return base.Channel.getStatusAsync(request); - } - - public System.Threading.Tasks.Task getStatusAsync() { - Entelect.BattleCity.Challenge.ChallengeService.getStatus inValue = new Entelect.BattleCity.Challenge.ChallengeService.getStatus(); - return ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).getStatusAsync(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Entelect.BattleCity.Challenge.ChallengeService.setActionResponse Entelect.BattleCity.Challenge.ChallengeService.Challenge.setAction(Entelect.BattleCity.Challenge.ChallengeService.setAction request) { - return base.Channel.setAction(request); - } - - public Entelect.BattleCity.Challenge.ChallengeService.delta setAction(int arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { - Entelect.BattleCity.Challenge.ChallengeService.setAction inValue = new Entelect.BattleCity.Challenge.ChallengeService.setAction(); - inValue.arg0 = arg0; - inValue.arg1 = arg1; - Entelect.BattleCity.Challenge.ChallengeService.setActionResponse retVal = ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).setAction(inValue); - return retVal.@return; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Entelect.BattleCity.Challenge.ChallengeService.Challenge.setActionAsync(Entelect.BattleCity.Challenge.ChallengeService.setAction request) { - return base.Channel.setActionAsync(request); - } - - public System.Threading.Tasks.Task setActionAsync(int arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { - Entelect.BattleCity.Challenge.ChallengeService.setAction inValue = new Entelect.BattleCity.Challenge.ChallengeService.setAction(); - inValue.arg0 = arg0; - inValue.arg1 = arg1; - return ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).setActionAsync(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Entelect.BattleCity.Challenge.ChallengeService.loginResponse Entelect.BattleCity.Challenge.ChallengeService.Challenge.login(Entelect.BattleCity.Challenge.ChallengeService.login request) { - return base.Channel.login(request); - } - - public System.Nullable[][] login() { - Entelect.BattleCity.Challenge.ChallengeService.login inValue = new Entelect.BattleCity.Challenge.ChallengeService.login(); - Entelect.BattleCity.Challenge.ChallengeService.loginResponse retVal = ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).login(inValue); - return retVal.@return; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Entelect.BattleCity.Challenge.ChallengeService.Challenge.loginAsync(Entelect.BattleCity.Challenge.ChallengeService.login request) { - return base.Channel.loginAsync(request); - } - - public System.Threading.Tasks.Task loginAsync() { - Entelect.BattleCity.Challenge.ChallengeService.login inValue = new Entelect.BattleCity.Challenge.ChallengeService.login(); - return ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).loginAsync(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse Entelect.BattleCity.Challenge.ChallengeService.Challenge.setActions(Entelect.BattleCity.Challenge.ChallengeService.setActions request) { - return base.Channel.setActions(request); - } - - public Entelect.BattleCity.Challenge.ChallengeService.delta setActions(Entelect.BattleCity.Challenge.ChallengeService.action arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { - Entelect.BattleCity.Challenge.ChallengeService.setActions inValue = new Entelect.BattleCity.Challenge.ChallengeService.setActions(); - inValue.arg0 = arg0; - inValue.arg1 = arg1; - Entelect.BattleCity.Challenge.ChallengeService.setActionsResponse retVal = ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).setActions(inValue); - return retVal.@return; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Entelect.BattleCity.Challenge.ChallengeService.Challenge.setActionsAsync(Entelect.BattleCity.Challenge.ChallengeService.setActions request) { - return base.Channel.setActionsAsync(request); - } - - public System.Threading.Tasks.Task setActionsAsync(Entelect.BattleCity.Challenge.ChallengeService.action arg0, Entelect.BattleCity.Challenge.ChallengeService.action arg1) { - Entelect.BattleCity.Challenge.ChallengeService.setActions inValue = new Entelect.BattleCity.Challenge.ChallengeService.setActions(); - inValue.arg0 = arg0; - inValue.arg1 = arg1; - return ((Entelect.BattleCity.Challenge.ChallengeService.Challenge)(this)).setActionsAsync(inValue); - } - } -} diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.svcmap b/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.svcmap deleted file mode 100644 index 8cd1468..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/Reference.svcmap +++ /dev/null @@ -1,31 +0,0 @@ - - - - false - true - true - - false - false - false - - - true - Auto - true - true - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration.svcinfo b/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration.svcinfo deleted file mode 100644 index 6bbf9a9..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration.svcinfo +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration91.svcinfo b/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration91.svcinfo deleted file mode 100644 index fea37b0..0000000 --- a/Entelect.BattleCity.Challenge/Service References/ChallengeService/configuration91.svcinfo +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - ChallengeServiceSoapBinding - - - - - - - - - - - - - - - - - - - - - StrongWildcard - - - - - - 65536 - - - - - - - - - System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - System.Text.UTF8Encoding - - - Buffered - - - - - - Text - - - System.ServiceModel.Configuration.BasicHttpSecurityElement - - - None - - - System.ServiceModel.Configuration.HttpTransportSecurityElement - - - None - - - None - - - System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement - - - Never - - - TransportSelected - - - (Collection) - - - - - - System.ServiceModel.Configuration.BasicHttpMessageSecurityElement - - - UserName - - - Default - - - - - - - - - http://localhost:9090/ChallengePort - - - - - - basicHttpBinding - - - ChallengeServiceSoapBinding - - - ChallengeService.Challenge - - - System.ServiceModel.Configuration.AddressHeaderCollectionElement - - - <Header /> - - - System.ServiceModel.Configuration.IdentityElement - - - System.ServiceModel.Configuration.UserPrincipalNameElement - - - - - - System.ServiceModel.Configuration.ServicePrincipalNameElement - - - - - - System.ServiceModel.Configuration.DnsElement - - - - - - System.ServiceModel.Configuration.RsaElement - - - - - - System.ServiceModel.Configuration.CertificateElement - - - - - - System.ServiceModel.Configuration.CertificateReferenceElement - - - My - - - LocalMachine - - - FindBySubjectDistinguishedName - - - - - - False - - - ChallengePort - - - - - - - - - - - \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/compile.bat b/Entelect.BattleCity.Challenge/compile.bat deleted file mode 100644 index 4f3d152..0000000 --- a/Entelect.BattleCity.Challenge/compile.bat +++ /dev/null @@ -1 +0,0 @@ -MSBuild.exe /property:Configuration=Release Entelect.BattleCity.Challenge.csproj \ No newline at end of file diff --git a/Entelect.BattleCity.Challenge/start.bat b/Entelect.BattleCity.Challenge/start.bat deleted file mode 100644 index 521c376..0000000 --- a/Entelect.BattleCity.Challenge/start.bat +++ /dev/null @@ -1 +0,0 @@ -"bin/Release/Entelect.BattleCity.Challenge.exe" %1 \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index e868ec0..0000000 --- a/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Botinator -========= - -My entry for the Entelect 100k Challenge 2013. - -The task for the 2013 100k challenge was to write a program which connects to a SOAP web service and controls the tanks in a game of Battle City. Each player has two tanks and a base on a two dimensional board. The player who manages to destroy their opponent's base first wins. - -I'm currently employed by Entelect, so I could not enter the 100k challenge, but we did have an internal version of the challenge. This bot came second in the internal challenge. - -This is an intentionally 'stupid' bot. It doesn't use any fancy AI algorithms, and doesn't really even look at what is happening. Despite being pretty stupid, it actually works fairly well. - -The core of the algorithm is that each tank compares its position to that of the enemy base. If it is in line with the base horizontally, it faces the base. If it is not in line with the base, it faces in the direction it would need to head to be in line with the base. If the tank can shoot, it shoots. If it can't shoot, it moves forward. I find it easiest to visualise this as an 'L' pattern. -- cgit v1.2.3