Beispiel #1
0
 public Automata_Engine(Graphics_Handler gh, int seed, int width, int height)
 {
     this.width  = width;
     this.height = height;
     graphics    = gh;
     Reset(seed);
 }
Beispiel #2
0
        public Form1()
        {
            InitializeComponent();


            int       pnl_width  = pnl_Display.Width;
            int       pnl_height = pnl_Display.Height;
            const int width      = 320;
            const int height     = 240;
            int       seed       = 0;


            Graphics_Handler gh = new Graphics_Handler(pnl_Display.CreateGraphics(), pnl_width, pnl_height);

            gh.Set_Hash_Lable(lbl_Hash_Value);
            gh.Set_Gen_Count_Lable(lbl_Gen_Count);

            automata = new Automata_Engine(gh, seed, width, height);

            cmb_Colors.Items.Add("Black and White");
            cmb_Colors.Items.Add("Orange Fiesta");
            cmb_Colors.Items.Add("Crimson Sea");
            cmb_Colors.SelectedIndex = 0;

            cmb_Rules.Items.Add("Orthagonal");
            cmb_Rules.Items.Add("Diagonal");
            cmb_Rules.Items.Add("Alternating");
            cmb_Rules.SelectedIndex = 0;
        }