Example #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Init...");
            le = new LevelEngine();
            int delay = 23;
            Display disp = new Display();
            disp.le = le;
            disp.Show();
            disp.BringToFront();
            le.disp = disp;
            SetWindowPosition(0, 0, 668, 331);
            disp.Left = 0;
            disp.Top = 331;
            while (true)
            {
                Thread.Sleep(delay);
                Application.DoEvents();
                if (le.Pause)
                    continue;
                le.Draw();
                disp.Refresh();
                le.Advance();
                if(Console.KeyAvailable)
                    switch (Console.ReadKey().KeyChar)
                    {
                        case 'w':
                            if (delay > 10)
                                delay -= 10;
                            break;
                        case 's':
                            if (delay < 500)
                                delay += 10;
                            break;
                        case (char)13:
                            le.ResetLevel();
                            break;
                        case (char)27:
                            return;

                    }
                Console.WriteLine("Delay : {0}ms", delay);
            }
        }
Example #2
0
 public NeuroEngine(LevelEngine l)
 {
     le = l;
     Generate(10, 10, 10, 5, 3);
 }