예제 #1
0
        public GameController(MainForm mainForm, DropBoard dropBoard, Player player1, Player player2)
        {
            _mainForm = mainForm;
            _dropBoard = dropBoard;
            _player1 = player1;
            _player2 = player2;

            _game = new Game.GameCore(_player1, _player2);
            _game.GameStateChanged += new EventHandler(OnGameStateChanged);
        }
예제 #2
0
        public GameController(MainForm mainForm, DropBoard dropBoard, Player player1, Player player2)
        {
            _mainForm  = mainForm;
            _dropBoard = dropBoard;
            _player1   = player1;
            _player2   = player2;

            _game = new Game.GameCore(_player1, _player2);
            _game.GameStateChanged += new EventHandler(OnGameStateChanged);
        }
예제 #3
0
        public UIBoardColumn(DropBoard dropBoard, Game.Column column)
        {
            _dropBoard = dropBoard;
            _column = column;
            var columnHeight = _column.Tiles.Count * UIBoardTile.TileSize.Height;
            var currentY = columnHeight - UIBoardTile.TileSize.Height; //We start from the bottom and work upwards adding tiles
            _column.Tiles.ForEach( tile => {
                UIBoardTile uiTile = new UIBoardTile(this, tile);
                _tiles.Add(uiTile);
                uiTile.Position = new Point(0, currentY);
                currentY -= uiTile.Height;
            });

            this.Size = new Size(ColumnWidth, columnHeight);
        }
예제 #4
0
        public UIBoardColumn(DropBoard dropBoard, Game.Column column)
        {
            _dropBoard = dropBoard;
            _column    = column;
            var columnHeight = _column.Tiles.Count * UIBoardTile.TileSize.Height;
            var currentY     = columnHeight - UIBoardTile.TileSize.Height; //We start from the bottom and work upwards adding tiles

            _column.Tiles.ForEach(tile => {
                UIBoardTile uiTile = new UIBoardTile(this, tile);
                _tiles.Add(uiTile);
                uiTile.Position = new Point(0, currentY);
                currentY       -= uiTile.Height;
            });

            this.Size = new Size(ColumnWidth, columnHeight);
        }