20 lines
611 B
C#
20 lines
611 B
C#
using Enums;
|
|
using Models.Interfaces;
|
|
using Structs;
|
|
using UnityEngine;
|
|
|
|
namespace Utils {
|
|
public static class GemUtils {
|
|
public static GemTypeValues GetGemValues(GemType type, GemTypeValues[] gemValues) {
|
|
foreach (GemTypeValues gemValue in gemValues) {
|
|
if(gemValue.type == type) return gemValue;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
} |