Witam,Mam taki problem.Napisałem sobie taki oto program w którym rysuję przy pomocy Readkey
using System;
class Program
{
static void Main()
{
int a=0, b=0;
while (true)
{
ConsoleKeyInfo o = Console.ReadKey();
if (o.Key == ConsoleKey.LeftArrow)
{
b = b - 1;
Console.SetCursorPosition(b, a);
Console.Write("█");
}
if (o.Key == ConsoleKey.RightArrow)
{
b = b + 1;
Console.SetCursorPosition(b, a);
Console.Write("█");
}
if (o.Key == ConsoleKey.DownArrow)
{
a = a + 1;
Console.SetCursorPosition(b, a);
Console.Write("█");
}
if (o.Key == ConsoleKey.UpArrow)
{
a = a - 1;
Console.SetCursorPosition(b, a);
Console.Write("█");
}
}
}
}
Problem polega na tym,iż kiedy przejadę ponownie po narysowanej linii ( w większości przypadków spróbujcie ) to ona znika.Nie wiem jak temy zaradzić
Pozdrawiam