Files
Csharp/C#核心实践/贪吃蛇/Lesson4/Wall.cs
T

23 lines
475 B
C#
Raw Normal View History

2025-09-21 20:11:21 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 贪吃蛇
{
class Wall : GameObject
{
public Wall(int x, int y)
{
pos = new Position(x, y);
}
public override void Draw()
{
Console.ForegroundColor = ConsoleColor.Red;
Console.SetCursorPosition(pos.x, pos.y);
Console.Write("■");
}
}
}