[Fix] UI Logic

This commit is contained in:
2026-06-06 22:33:15 +07:00
parent f4ecf8b6f9
commit fdb22e9213
134 changed files with 5367 additions and 269 deletions
@@ -0,0 +1,20 @@
using UnityEngine;
namespace Minesweeper.Config
{
[CreateAssetMenu(fileName = "MinesweeperGameConfig", menuName = "Minesweeper/Game Config")]
public sealed class MinesweeperGameConfig : ScriptableObject
{
[SerializeField, Min(1)] private int width = 9;
[SerializeField, Min(1)] private int height = 9;
[SerializeField, Min(1)] private int minesCount = 10;
[SerializeField] private KeyCode restartKey = KeyCode.R;
public int Width => width;
public int Height => height;
public int MinesCount => minesCount;
public KeyCode RestartKey => restartKey;
public bool IsValid => width > 0 && height > 0 && minesCount > 0 && minesCount < width * height;
}
}