public static void Main() { int c; try { StringBuilder input = new StringBuilder(); StringBuilder line = new StringBuilder(); while ((c = Console.Read()) >= 0) { switch (c) { case '\r': break; case '\n': string thisLine = line.ToString(); if (thisLine.Equals("go")) { Universe uni = new Universe(input.ToString(), null); input.Length = 0; FannyHeirdooBot.DoTurn(uni); uni.FinishTurn(); } else { input.Append(thisLine + "\n"); } line.Length = 0; break; default: line.Append((char)c); break; } } } catch (Exception) { // Owned. } }
/// <summary> /// In CreateGameBoardInstance you have created the gameboard, now use it with your bot. /// </summary> public override void DoMove() { FannyHeirdooBot.DoTurn(gameboard); gameboard.FinishTurn(); }