// Visualize only text objects
 public void VisualizeText(TextObject obj)
 {
     Console.SetCursorPosition(obj.Position.Col, obj.Position.Row);
     Console.ForegroundColor = obj.Color;
     Console.Write(obj);
 }
示例#2
0
 private void AddPoints(TextObject obj)
 {
     this.points = obj as Points;
 }
示例#3
0
        private void AddTextObject(TextObject obj)
        {
            this.textObjects.Add(obj);

            if (obj is Points)
            {
                this.AddPoints(obj);
            }
            else if (obj is CatsNumber)
            {
                this.AddCatsNumber(obj);
            }
        }
示例#4
0
 private void AddCatsNumber(TextObject obj)
 {
     this.catsNumber = obj as CatsNumber;
 }