Пример #1
0
        public Form1()
        {
            InitializeComponent();

            boardPanel = new LifeGamePanel(32, 32)
            {
                Parent   = this,
                Location = new Point(118, 12)
            };

            codes = new uint[height];
        }
Пример #2
0
        public ChessBoard(int size, int initTurn, ulong initialBoard, int gpt, bool isTorus)
        {
            InitializeComponent();

            CellPanel.AllowClick = false;
            this.Size            = new Size(148 + 19 * size, 63 + 19 * size);
            boardPanel           = new LifeGamePanel(size, size)
            {
                Parent   = this,
                Location = new Point(118, 12)
            };
            boardPanel.PanelStateChanged += new EventHandler(Board1_PanelStateChanged);

            BoardSize          = size;
            InitializationTurn = initTurn;
            gameCode           = initialBoard;
            GenerationPerTurn  = gpt;
            IsTorus            = isTorus;

            InitializeBoardRandom();
        }