Exemple #1
0
        public Renderer(string title, short width, short height, short numbuffers = 2)
        {
            if (ConsoleHandle.IsInvalid) throw new Exception("Cannot properly load console window.");

            //this.width = width;
            Width = width;
            Height = height;
            this.numbuffers = numbuffers;

            for (int i = 0; i < drawers.Length; ++i) drawers[i] = new Drawer(this);

            Console.Title = title;
            Console.CursorVisible = false;
            Console.SetWindowSize(width, height);
            Console.SetBufferSize(width, height);
        }
Exemple #2
0
 public void Render(Drawer d)
 {
     d.Draw(Shape, Color, Location.Position);
 }