Example #1
0
    public void BrickDrawManualTest()
    {
        var blockFactory = new BlockFactory();
        var visualizer   = new ElementVisualizaer();

        var brick = blockFactory.GetBrick(0, 20);

        visualizer.Add(brick);

        brick       = blockFactory.GetBrick(20, 20);
        brick.State = BrickState.Burn;
        visualizer.Add(brick);

        visualizer.Start();
    }
Example #2
0
        private void AddObject(int x, int y)
        {
            if (!IsAboveObject(x, y))
            {
                switch (selectedObject)
                {
                case '1':
                    model.Add(blockFactory.GetStone(x, y));
                    break;

                case '2':
                    model.Add(blockFactory.GetWater(x, y));
                    break;

                case '3':
                    model.Add(blockFactory.GetBrick(x, y));
                    break;

                case '4':
                    model.Add(blockFactory.GetStairs(x, y));
                    break;

                case '5':
                    model.Add(blockFactory.GetRail(x, y));
                    break;

                case '6':
                    model.Add(blockFactory.GetGold(x, y));
                    model.MaxScore++;
                    break;

                case '7':
                    model.Player = blockFactory.GetPlayer(x, y);
                    break;
                }
            }
        }