贪吃蛇小项目

This commit is contained in:
2025-09-21 20:11:21 +08:00
parent 0a1446e7b3
commit 116b65164b
18 changed files with 695 additions and 25 deletions
+22
View File
@@ -0,0 +1,22 @@
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("■");
}
}
}