[Add] Basic project architecture

This commit is contained in:
2026-06-06 20:53:30 +07:00
parent 9ebedb12ec
commit 8ed9cc655f
79 changed files with 1080 additions and 9 deletions
@@ -0,0 +1,38 @@
using Minesweeper.Commands;
using Minesweeper.Presentation.Views;
namespace Minesweeper.Presentation.Presenters
{
public sealed class MainMenuPresenter : IPresenter
{
private readonly IGameCommandDispatcher commandDispatcher;
private readonly IMainMenuView view;
public MainMenuPresenter(IGameCommandDispatcher commandDispatcher, IMainMenuView view = null)
{
this.commandDispatcher = commandDispatcher;
this.view = view;
}
public void Initialize()
{
if (view != null)
{
view.StartClicked += OnStartClicked;
}
}
public void Dispose()
{
if (view != null)
{
view.StartClicked -= OnStartClicked;
}
}
private void OnStartClicked()
{
commandDispatcher.Dispatch(new StartGameCommand());
}
}
}