コード例 #1
0
        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();
            game.NewGame();
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: kcgriggs/LightsOut
 public MainForm()
 {
     InitializeComponent();
     game = new LightsOutGame();
     this.x3ToolStripMenuItem.Checked = true;
     CellLength = GridLength / game.GridSize;
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: AdamBJohnson/LightsOut
        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();

            CellLength = GridLength / game.GridSize;
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: qbrandt/LightsOut
        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;
        }
コード例 #5
0
        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();

            gridLength = newGameButton.Location.Y - GridOffset - GridBottomOffset;
        }
コード例 #6
0
        public MainWindow()
        {
            InitializeComponent();

            game = new LightsOutGame();

            CreateGrid();
            DrawGrid();
        }
コード例 #7
0
        private AboutForm aboutBox;             // About dialog box

        public MainForm()
        {
            InitializeComponent();

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

            // Default to 3x3 grid
            x3ToolStripMenuItem.Checked = true;
        }
コード例 #8
0
ファイル: MainForm.cs プロジェクト: jdhat/LightsOut
        public MainForm()
        {
            InitializeComponent();

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

            game = new LightsOutGame();

            x3ToolStripMenuItem.Checked = true;

            cellLength = gridLength / game.GridSize;
        }
コード例 #9
0
ファイル: MainForm.cs プロジェクト: JonathanSCasper/LightsOut
        //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;
        }
コード例 #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);
                }
            }
        }