Exemplo n.º 1
0
        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();
            game.NewGame();
        }
Exemplo n.º 2
0
 public MainForm()
 {
     InitializeComponent();
     game = new LightsOutGame();
     this.x3ToolStripMenuItem.Checked = true;
     CellLength = GridLength / game.GridSize;
 }
Exemplo n.º 3
0
        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();

            CellLength = GridLength / game.GridSize;
        }
Exemplo n.º 4
0
        public MainForm()
        {
            InitializeComponent();

            lightsOutGame = new LightsOutGame(); //Make sure this is initialized before grid caluculations happen or you'll get a null reference error

            GridLength = Math.Min(this.Width, this.Height - 100) - 2 * GridOffset;
        }
Exemplo n.º 5
0
        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();

            gridLength = newGameButton.Location.Y - GridOffset - GridBottomOffset;
        }
Exemplo n.º 6
0
        public MainWindow()
        {
            InitializeComponent();

            game = new LightsOutGame();

            CreateGrid();
            DrawGrid();
        }
Exemplo n.º 7
0
        private AboutForm aboutBox;             // About dialog box

        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();
            game.NewGame();

            // Default to 3x3 grid
            x3ToolStripMenuItem.Checked = true;
        }
Exemplo n.º 8
0
        public MainForm()
        {
            InitializeComponent();

            //rand = new Random(); // Initializes random number generator4

            game = new LightsOutGame();

            x3ToolStripMenuItem.Checked = true;

            cellLength = gridLength / game.GridSize;
        }
Exemplo n.º 9
0
        //private bool[,] grid;
        //private Random rand;

        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();
            game.NewGame();

            //rand = new Random();
            //grid = new bool[NumCells, NumCells];

            //for (int r = 0; r < NumCells; r++)
            //    for (int c = 0; c < NumCells; c++)
            //        grid[r, c] = true;
        }
Exemplo n.º 10
0
        private Random rand;                // Used to generate random numbers
        public MainForm()
        {
            lightsOutGame = new LightsOutGame();

            InitializeComponent();
            rand = new Random();             // Initializes random number generator
            grid = new bool[NumCells, NumCells];

            for (int r = 0; r < NumCells; r++)
            {
                for (int c = 0; c < NumCells; c++)
                {
                    grid[r, c] = lightsOutGame.GetGridValue(r, c);
                }
            }
        }