Esempio n. 1
0
        public MainForm()
        {
            InitializeComponent();

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

            game = new LightsOutGame();

            CellLength = GridLength / game.GridSize;
        }
Esempio 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;
        }
Esempio n. 5
0
        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();

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

            game = new LightsOutGame();

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

        public MainForm()
        {
            InitializeComponent();

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

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

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

            game = new LightsOutGame();

            x3ToolStripMenuItem.Checked = true;

            cellLength = gridLength / game.GridSize;
        }
Esempio 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;
        }
Esempio 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);
                }
            }
        }