-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
38 lines (33 loc) · 1.21 KB
/
Program.cs
File metadata and controls
38 lines (33 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using PatternFacade.Facade;
using System;
namespace PatternFacade
{
internal class Program
{
static void Main(string[] args)
{
GameFacade game = new GameFacade();
GameResult result = game.StartGame();
if (result.IsSuccess)
{
Console.WriteLine($"\n=== ИГРА ЗАПУЩЕНА ===");
if (result.LoadedSave != null)
{
Console.WriteLine($"Загружен персонаж: {result.LoadedSave.PlayerName}");
Console.WriteLine($"Уровень: {result.LoadedSave.Level}, Здоровье: {result.LoadedSave.Health}");
}
else
{
Console.WriteLine("Новая игра (сохранение не найдено)");
}
Console.WriteLine("\n[ИГРА] Нажмите Enter для выхода...");
Console.ReadLine();
game.Shutdown();
}
else
{
Console.WriteLine($"\n!!! ОШИБКА ЗАПУСКА: {result.ErrorMessage}");
}
}
}
}