static void Main(string[] args) { //var player1 = new ContestPlayerWrapper(@"C:\Projects\GameOfDrones\History\Mark1\GameOfDrones.ContestClient.exe"); //var player2 = new ContestPlayerWrapper(@"C:\Projects\GameOfDrones\History\Mark1\GameOfDrones.ContestClient.exe"); var player1 = new TaskBasedPlayer(); var player2 = new TaskBasedPlayer(); using(var client = new ClientSimulator(6, 3, player1, player2)) { client.Initialize(); while(!client.HasFinished) client.Update(); } }
static int RunGame(IEnumerable<string> playerPaths) { var players = playerPaths.Select(p => new ContestPlayerWrapper(p)).ToArray<IPlayer>(); var minNbrZones = Math.Max(players.Length + 1, 4); var maxNbrZones = 8; var minNbrDrones = 3; var maxNbrDrones = 11; var nbrZones = random.Next(minNbrZones, maxNbrZones + 1); var nbrDrones = random.Next(minNbrDrones, maxNbrDrones + 1); using(var client = new ClientSimulator(nbrDrones, nbrZones, players)) { client.Initialize(); while(!client.HasFinished) client.Update(); return client.WinnerId; } }