Exemplo n.º 1
0
        public ReversiBoard(ReversiLayout layout)
        {
            _layout = layout;

            // Default Initialization
            _borderColor = Color.FromArgb(255, 50, 50, 50);
            _tileColor   = Color.FromArgb(255, 25, 25, 25);

            _player1Color = Color.FromArgb(255, 255, 25, 25);  // Red
            _player2Color = Color.FromArgb(255, 25, 150, 255); // Blue

            _markers = new ReversiPlayer[_layout.Columns, _layout.Rows];

            this.Size = new Size(_layout.Columns * _tileSize, _layout.Rows * _tileSize + _paddingBottom);
            _faintCollection.ListChanged += new ListChangedEventHandler((sender, e) => this.Invalidate());
            NewGame();
        }
Exemplo n.º 2
0
        public ReversiBoard(ReversiLayout layout)
        {
            _layout = layout;

            // Default Initialization
            _borderColor = Color.FromArgb(255, 50, 50, 50);
            _tileColor = Color.FromArgb(255, 25, 25, 25);

            _player1Color = Color.FromArgb(255, 255, 25, 25); // Red
            _player2Color = Color.FromArgb(255, 25, 150, 255); // Blue

            _markers = new ReversiPlayer[_layout.Columns, _layout.Rows];

            this.Size = new Size(_layout.Columns * _tileSize, _layout.Rows * _tileSize + _paddingBottom);
            _faintCollection.ListChanged += new ListChangedEventHandler((sender, e) => this.Invalidate());
            NewGame();
        }