Move Bomb Responsibilities to BombService

This commit is contained in:
2025-12-17 05:47:28 +08:00
parent 9f2ef833b2
commit b3dc2cb4bd
12 changed files with 262 additions and 248 deletions

View File

@@ -1,5 +1,8 @@
using Enums;
using Models.Interfaces;
using Services;
using Structs;
using UnityEngine;
namespace Utils {
public static class GemUtils {
@@ -10,5 +13,9 @@ namespace Utils {
return default;
}
public static bool IsInBounds(Vector2Int position, IGameBoard gameBoard) {
return position.x >= 0 && position.x < gameBoard.Width && position.y >= 0 && position.y < gameBoard.Height;
}
}
}

View File

@@ -10,5 +10,9 @@ namespace Utils {
public static Vector2 ToVector2(this Vector2Int v) {
return new Vector2(v.x, v.y);
}
public static Vector2Int ToVector2Int(this Vector2 v) {
return new Vector2Int((int)v.x, (int)v.y);
}
}
}