Exemple #1
0
        private void newGameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            game.StartNew();
            game.AddNewTile();

            gameView.AddNewTile(game.NewTile);
            gameView.Update();

            Invalidate();
        }
Exemple #2
0
        public bool OnMouseDoubleClick(Point point)
        {
            var position = gameView.GetPosition(point);

            if (position == null)
            {
                return(false);
            }

            if (!game.AddTileOnField(position.Value, newTileView.Tile))
            {
                return(false);
            }

            gameView.Update();

            game.AddNewTile();
            gameView.AddNewTile(game.NewTile);

            return(true);
        }