feat: l geminada working

This commit is contained in:
Gerard Gascón 2024-04-14 23:15:50 +02:00
parent 1869a92580
commit 30ca50fb35
15 changed files with 189 additions and 29 deletions

View file

@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.Linq;
namespace Extensions {
public class LimitedSizeList<T> {
public readonly List<T> List;
private readonly int _maxSize;
public LimitedSizeList(int maxSize) {
_maxSize = maxSize;
List = new List<T>(maxSize);
}
public void Add(T item) {
List.Add(item);
if (List.Count > _maxSize) {
List.RemoveAt(0);
}
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: bd4db2e2399447bdaa6b28d73a4fc7f9
timeCreated: 1713127625

View file

@ -0,0 +1,3 @@
{
"name": "SantJordi.Extensions"
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b347d0ff97f738846abb5625028d64db
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: