Exemplo n.º 1
0
 static void Main(string[] args)
 {
     string pattern = "- - - X X - - -\n- X - - - - X -\nX - - - - - - X\n- X - - - - X -\n- - - X X - - -\n";
     Grid grid = new Grid(pattern);
     Console.WriteLine("Grid As given");
     Console.WriteLine(grid.ToString());
     grid.AdvanceToNextGeneration();
     Console.WriteLine(grid.ToString());
     Console.ReadLine();
 }
Exemplo n.º 2
0
 public void ToStringTest7()
 {
     Grid target = new Grid("- X -\nX - X\n- X -\n"); // TODO: Initialize to an appropriate value
     string expected = "- X -\nX - X\n- X -\n";
     string actual;
     target.AdvanceToNextGeneration();
     actual = target.ToString();
     Assert.AreEqual(expected, actual);
 }
Exemplo n.º 3
0
 public void ToStringTest4()
 {
     Grid target = new Grid("- X X X\nX X X -");
     string expected = "- - X -\nX - - X\nX - - X\n- X - -\n";
     string actual;
     target.AdvanceToNextGeneration();
     actual = target.ToString();
     Assert.AreEqual(expected, actual);
 }