Пример #1
0
 public void DropTokenOnColumn(UIBoardColumn uiColumn)
 {
     if (!uiColumn.GameColumn.IsFull)
     {
         _game.DropTokenOnColumn(uiColumn.GameColumn.ColumnNo);
     }
 }
Пример #2
0
        public void SetupBoard()
        {
            if (flashTimer != null)
            {
                flashTimer.Dispose();
                flashTimer = null;
            }
            _flashOn = false;

            _uiBoardColumns = new List <UIBoardColumn>();

            if (_currentGame == null || _currentGame.Game == null || _currentGame.Game.Board == null)
            {
                return;
            }

            var left = StartLeft;

            _currentGame.Game.Board.Columns.ForEach(col => {
                var uiColumn      = new UIBoardColumn(this, col);
                uiColumn.Position = new Point(left, StartTop);
                _uiBoardColumns.Add(uiColumn);
                left += uiColumn.Width;
            });
        }
Пример #3
0
 public void DropTokenOnColumn(UIBoardColumn uiColumn)
 {
     if (!uiColumn.GameColumn.IsFull) {
         _game.DropTokenOnColumn(uiColumn.GameColumn.ColumnNo);
     }
 }
Пример #4
0
 public UIBoardTile(UIBoardColumn uiColumn, Game.Tile tile)
 {
     _uiColumn = uiColumn;
     _tile     = tile;
     this.Size = TileSize;
 }
Пример #5
0
        public void SetupBoard()
        {
            if (flashTimer != null) {
                flashTimer.Dispose();
                flashTimer = null;
            }
            _flashOn = false;

            _uiBoardColumns = new List<UIBoardColumn>();

            if (_currentGame == null || _currentGame.Game == null || _currentGame.Game.Board == null) {
                return;
            }

            var left = StartLeft;
            _currentGame.Game.Board.Columns.ForEach(col => {
                var uiColumn = new UIBoardColumn(this, col);
                uiColumn.Position = new Point(left, StartTop);
                _uiBoardColumns.Add(uiColumn);
                left += uiColumn.Width;
            });
        }