예제 #1
0
 private static void CreateGlider(Game myGame, Location location)
 {
     myGame.CurrentWorld.PlaceCell(new Location(location, 3, 1));
     myGame.CurrentWorld.PlaceCell(new Location(location, 1, 2));
     myGame.CurrentWorld.PlaceCell(new Location(location, 3, 2));
     myGame.CurrentWorld.PlaceCell(new Location(location, 2, 3));
     myGame.CurrentWorld.PlaceCell(new Location(location, 3, 3));
 }
예제 #2
0
        public static void Main()
        {
            var myGame = new Game();
            //CreateGlider(myGame, new Location(1, 1));
            CreateBlinker(myGame, new Location(15, 1));
               // CreateGlider(myGame, new Location(15, 1));

            while (Console.ReadKey().KeyChar != 'q')
            {
                myGame.CurrentWorld = myGame.Evolve();
                Draw(myGame.CurrentWorld);
            }
        }
예제 #3
0
 private static void CreateBlinker(Game myGame, Location location)
 {
     myGame.CurrentWorld.PlaceCell(new Location(location, 1, 1));
     myGame.CurrentWorld.PlaceCell(new Location(location, 1, 2));
     myGame.CurrentWorld.PlaceCell(new Location(location, 1, 3));
 }