Демонстрируемый код на практических занятиях
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

using ClassLib000.Walker;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleCore
{
class RobotConsoler
{
internal static void DrawRoom(Appartment app)
{
const int width = 3;
const int height = 3;
foreach (CleanSpace space in app.CleanSpaces)
{
int cursorX = space.X * width;
int cursorY = space.Y * height;
Console.SetCursorPosition(cursorX, cursorY);
Console.Write("🌹");
if (space.WallEast)
{
Console.SetCursorPosition(cursorX + 1, cursorY);
Console.Write("•");
}
if (space.WallNorth)
{
Console.SetCursorPosition(cursorX, cursorY - 1);
Console.Write("•");
}
// .. TODO:
}
}
}
}