贪吃蛇+修改命令提示符

This commit is contained in:
2026-02-11 02:09:32 +08:00
parent d6f11f2c8f
commit 907cede2f6
7 changed files with 230 additions and 2 deletions

View File

@@ -86,7 +86,9 @@ namespace CMLeonOS
public void Run()
{
User currentUser = userSystem.CurrentLoggedInUser;
bool shouldExit = false;
while (true)
{
// 显示当前文件夹路径作为提示符(彩色)
@@ -94,6 +96,10 @@ namespace CMLeonOS
ConsoleColor originalColor = Console.ForegroundColor;
// Console.ForegroundColor = ConsoleColor.Cyan;
// Console.Write($"{currentPath} | {prompt}");
Console.ForegroundColor = ConsoleColor.DarkGreen;
Console.Write($"{currentUser.Username}");
Console.ForegroundColor = ConsoleColor.White;
Console.Write($" $ ");
Console.ForegroundColor = ConsoleColor.Magenta;
Console.Write($"{currentPath}");
Console.ForegroundColor = ConsoleColor.White;
@@ -1628,6 +1634,11 @@ namespace CMLeonOS
Commands.LabyrinthCommand.ProcessLabyrinth();
}
public void PlaySnake()
{
Commands.Utility.SnakeCommand.PlaySnake();
}
public void ProcessAlias(string args)
{
if (string.IsNullOrWhiteSpace(args))