//делегат void ShowPlate(int x, int y, Plate plate) { graph.visible = false; graph.Draw(animates[x, y]); switch (plate.state) { case State.hide: animates[x, y] = new AnimateTurn(domino.map[x, y].a, domino.map[x, y].b, x, y); animates[x, y].Hide(); break; case State.open: animates[x, y] = new AnimateTurn(domino.map[x, y].a, domino.map[x, y].b, x, y); animates[x, y].Open(); break; case State.mark: animates[x, y] = new AnimateMark(domino.map[x, y].a, domino.map[x, y].b, x, y); animates[x, y].Open(); break; case State.drop: animates[x, y] = new AnimateMove(domino.map[x, y].a, domino.map[x, y].b, x, y); animates[x, y].Open(); if (domino.IsOpenTop(x,y)) animates[x, y].Move(0, 0, 0, -600); else animates[x, y].Move(0, 0, 0, 600); break; } }
void RollDomino() { graph.Clear(); mode = "roll"; int y = -2800 -400; for (int i = 0; i <= Domino.maxPoints; i++) for (int j = 0; j <= i; j++) { animates[i, j] = new AnimateMove(i, j, i, j); animates[i, j].Move(0, y, 0, 0); y = y + 100; } }