private static void Main(string[] args) { var game = new Game(new int[,] { {0, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 0, 0} }); while (true) { Console.Clear(); game.run(); System.Threading.Thread.Sleep(100); } }
public void newStateTest() { var game = new Game(new int[,] { {0, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 0, 0} }); Assert.AreEqual(game.newState(2, 1), 1); }
public void NextAdjTest(int x, int i, int j, int s, int expected) { var game = new Game(new int[,] { {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }); Assert.AreEqual(expected, game.nextAdj(x, i, j, s)); }