Further work on static side
This commit is contained in:
31
PkmnLib.Static/Libraries/MoveLibrary.cs
Normal file
31
PkmnLib.Static/Libraries/MoveLibrary.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using PkmnLib.Static.Moves;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Static.Libraries;
|
||||
|
||||
/// <summary>
|
||||
/// The library for all moves in the game.
|
||||
/// </summary>
|
||||
public interface IReadOnlyMoveLibrary
|
||||
{
|
||||
/// <summary>
|
||||
/// Tries to get a move from the library. Returns false if the move is not found.
|
||||
/// </summary>
|
||||
bool TryGet(StringKey key, [MaybeNullWhen(false)] out IMoveData value);
|
||||
/// <summary>
|
||||
/// Gets a random move from the library.
|
||||
/// </summary>
|
||||
IMoveData GetRandom(IRandom random);
|
||||
/// <summary>
|
||||
/// The amount of moves in the library.
|
||||
/// </summary>
|
||||
int Count { get; }
|
||||
/// <summary>
|
||||
/// Whether the library is empty.
|
||||
/// </summary>
|
||||
bool IsEmpty { get; }
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IReadOnlyMoveLibrary"/>
|
||||
public class MoveLibrary : DataLibrary<IMoveData>, IReadOnlyMoveLibrary;
|
||||
Reference in New Issue
Block a user