Exemplo n.º 1
0
        public Wall(int x, int y
                    , int length, Direction direction
                    , string display
                    )
        {
            X         = x;
            Y         = y;
            Length    = length;
            Direction = direction;
            Display   = display;
            switch (direction)
            {
            case Direction.Horizontal:
                Width  = length;
                Height = 1;
                break;

            case Direction.Vertical:
                Height = length;
                Width  = 1;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(direction), direction, message: null);
            }

            Renderer = RenderFactory.CreateRenderableFor <IBlock>(this);
        }
Exemplo n.º 2
0
 public Player(int x, int y)
 {
     X        = x;
     Y        = y;
     Renderer = RenderFactory.CreateRenderableFor <IPositioned>(this);
 }