public static void RunTurn(string gameState_Enc, string gameInfo_Enc) { LaPulzellaD_Orleans giovannaD_Arco = new LaPulzellaD_Orleans(); giovannaD_Arco.currGameState = new GameState(); giovannaD_Arco.currGameState.Decode(gameState_Enc); giovannaD_Arco.game = new GameInfo(); giovannaD_Arco.game.Decode(gameInfo_Enc); foreach (var site in giovannaD_Arco.currGameState.sites) { site.pos = giovannaD_Arco.game.sites[site.siteId].pos; } InfluenceMap map = new InfluenceMap(); giovannaD_Arco.think(out map); }
//#if RUNLOCAL public static InfluenceMap RunTurn() { LaPulzellaD_Orleans giovannaD_Arco = new LaPulzellaD_Orleans(); giovannaD_Arco.currGameState = new GameState(); giovannaD_Arco.currGameState.Decode(GAMESTATE_ENC); giovannaD_Arco.game = new GameInfo(); giovannaD_Arco.game.Decode(GAMEINFO_ENC); foreach (var site in giovannaD_Arco.currGameState.sites) { site.pos = giovannaD_Arco.game.sites[site.siteId].pos; } InfluenceMap map = new InfluenceMap(); giovannaD_Arco.think(out map); return(map); }
//#else static void Main(string[] args) { LaPulzellaD_Orleans giovannaD_Arco = new LaPulzellaD_Orleans(); giovannaD_Arco.ParseInputs_Begin(); int turn = 0; while (true) { turn++; giovannaD_Arco.ParseInputs_Turn(); if (turn == 1) { Console.Error.WriteLine("Game Info"); Console.Error.WriteLine(giovannaD_Arco.game.Encode() + "\n"); } Console.Error.WriteLine(giovannaD_Arco.currGameState.Encode()); InfluenceMap map = new InfluenceMap(); TurnAction move = giovannaD_Arco.think(out map); move.PrintMove(); } }