贪吃蛇小项目
This commit is contained in:
@@ -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("■");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user