Exemple #1
0
        public StackView(Stack stack, GamePanelCallback callback, double availableWidth, int height)
        {
            InitializeComponent();
            this.Height = height;
            this.Width = (int) availableWidth;
            this.callback = callback;

            this.stack = stack;
            this.availableWidth = availableWidth;
            this.height = height;
        }
Exemple #2
0
        private void setupGame()
        {
            stacks = new List<Stack>();
            int level = (int)difficulty;
            for (int i = 1; i <= level; i++) {

                Stack stack = new Stack(i);
                this.stacks.Add(stack);

                // create bricks
                if (i == 1) {
                    for (int b = level; b >= 1; b--) {
                        Brick brick = new Brick(b, getRandomColor());
                        stack.addBrick(brick);
                    }
                }
            }
        }