Tell me how to fix the position of the figures (the triangle and the square move along the console, when their coordinates match, you need to fix their position)? I think in a similar way:
1st figure
public void DrawRectangle() { for (int i = 0; i < size; i++) { Console.SetCursorPosition(x, y + i); Console.WriteLine("*"); Console.SetCursorPosition(x + i, y + size); Console.WriteLine("*"); Console.SetCursorPosition(x + size, y + i); Console.WriteLine("*"); Console.SetCursorPosition(x + i, y); Console.WriteLine("*"); int[,] array1 = new int[x, y]; } } 2nd figure
public void DrawTriangle() { for (int i = 0; i < size; i++) { Console.SetCursorPosition(x1, y1 + i); Console.WriteLine("*"); Console.SetCursorPosition(x1 + i, y1 + size); Console.WriteLine("*"); Console.SetCursorPosition(x1 + i, y1 + i); Console.WriteLine("*"); int[,] array = new int[x1,y1]; } } And checking for the coincidence of coordinates
if(array == array1) { return; }