Beispiel #1
0
        public MainForm()
        {
            InitializeComponent();

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

            game = new LightsOutGame();

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

            game = new LightsOutGame();

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

            game = new LightsOutGame();

            CreateGrid();
            DrawGrid();
        }
Beispiel #7
0
        private AboutForm aboutBox;             // About dialog box

        public MainForm()
        {
            InitializeComponent();

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

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

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

            game = new LightsOutGame();

            x3ToolStripMenuItem.Checked = true;

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