Implement too many changes to list

This commit is contained in:
2026-07-07 11:46:31 +02:00
parent 8f66e83b65
commit 28486bff8c
50 changed files with 6344 additions and 1131 deletions
+13 -8
View File
@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
namespace KernelPanic.Combat
@@ -8,7 +7,7 @@ namespace KernelPanic.Combat
/// </summary>
public sealed class HandController
{
private readonly List<CardInstance> cards = new();
private readonly List<CardInstance> _cards = new();
public HandController(int ramCapacity)
{
@@ -16,26 +15,32 @@ namespace KernelPanic.Combat
}
public int RamCapacity { get; private set; }
public IReadOnlyList<CardInstance> Cards => cards;
public IReadOnlyList<CardInstance> Cards => _cards;
public bool CanAdd(CardInstance card)
{
throw new NotImplementedException();
return card != null && _cards.Count < RamCapacity;
}
public void Add(CardInstance card)
public bool Add(CardInstance card)
{
throw new NotImplementedException();
if (!CanAdd(card))
{
return false;
}
_cards.Add(card);
return true;
}
public bool Remove(CardInstance card)
{
throw new NotImplementedException();
return card != null && _cards.Remove(card);
}
public void Clear()
{
throw new NotImplementedException();
_cards.Clear();
}
}
}