public void GameEngineTests_StartGame() { StringBuilder commandInput = new StringBuilder(); for (int i = 0; i < GameEngine.GameBoardRows; i++) { for (int j = 0; j < GameEngine.GameBoardRows; j++) { commandInput.AppendFormat("{0} {1}", i, j).AppendLine(); } commandInput.AppendLine(); } commandInput.AppendLine("Gosho"); commandInput.AppendLine("top"); commandInput.AppendLine("restart"); commandInput.AppendLine("exit"); StreamReader reader = new StreamReader(new MemoryStream(Encoding.ASCII.GetBytes(commandInput.ToString()))); Console.SetIn(reader); IRenderable console = new ConsoleRenderer(); GameEngine.StartGame(console,false); }
/// <summary> /// The method where the game is being started from the GameEngine class. /// </summary> public static void Main() { IRenderable console = new ConsoleRenderer(); GameEngine.StartGame(console, false); }