Ejemplo n.º 1
0
        public GameGrid()
        {
            InitializeComponent();

            gl = GameLogic.GetInstance();
            GameGridCells = new GameCell[gl.SIZE, gl.SIZE];

            NewGame();
        }
Ejemplo n.º 2
0
 public void AddNewGameCell(int x, int y)
 {
     RemoveOldGameCell(x, y);
     GameGridCells[x, y] = new GameCell();
     GameGridCells[x, y].Value.Text = gl.GetValueAt(x, y).ToString();
     GameGridCells[x, y].Cell.Background = new SolidColorBrush(Colors.Gold);
     GameGridCells[x, y].RenderTransformOrigin = new Point(0.5, 0.5);
     GameGridCells[x, y].RenderTransform = new TranslateTransform(x * 125, y * 125);
     GameCanvas.Children.Add(GameGridCells[x, y]);
 }