static void Main(string[] args) { Console.WriteLine(FiggleFonts.Bubble.Render(Messages.Welcome)); var input = new Input(); var grid = GridSetUp.SetUpGrid(input); Console.Clear(); Output.DisplayString(grid.GetFormattedString()); var game = new Game(grid, input); game.SetInitialLiveCells(); game.UpdateGridAtEachTick(); }
public void SetUpGridWithCorrectDimensions() { var mockInput = new Mock <IInput>(); mockInput.SetupSequence(i => i.ReadInput()) .Returns("5") .Returns("5"); var expected = "[ ][ ][ ][ ][ ]" + Environment.NewLine + "[ ][ ][ ][ ][ ]" + Environment.NewLine + "[ ][ ][ ][ ][ ]" + Environment.NewLine + "[ ][ ][ ][ ][ ]" + Environment.NewLine + "[ ][ ][ ][ ][ ]" + Environment.NewLine; var actual = GridSetUp.SetUpGrid(mockInput.Object); Assert.Equal(expected, actual.GetFormattedString()); }
public void ContinueToReceiveDimensionInputsUntilInputIsValid() { var mockInput = new Mock <IInput>(); mockInput.SetupSequence(i => i.ReadInput()) .Returns("a") .Returns("5") .Returns("b") .Returns("5"); var expected = "[ ][ ][ ][ ][ ]" + Environment.NewLine + "[ ][ ][ ][ ][ ]" + Environment.NewLine + "[ ][ ][ ][ ][ ]" + Environment.NewLine + "[ ][ ][ ][ ][ ]" + Environment.NewLine + "[ ][ ][ ][ ][ ]" + Environment.NewLine; var actual = GridSetUp.SetUpGrid(mockInput.Object); Assert.Equal(expected, actual.GetFormattedString()); }
void SetUpScreen() { screenRect = GridSetUp.GetScreenRect(); }