Add skill management system: implement Skill and PetSkill models, create SkillController, and update ApplicationDbContext for skills
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
namespace PetCompanion.Models
|
||||
{
|
||||
public class Inventory
|
||||
{
|
||||
public List<Item> Items { get; set; } = new();
|
||||
public int Capacity { get; set; }
|
||||
|
||||
public bool AddItem(Item item)
|
||||
{
|
||||
if (Items.Count < Capacity)
|
||||
{
|
||||
Items.Add(item);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool RemoveItem(Item item)
|
||||
{
|
||||
return Items.Remove(item);
|
||||
}
|
||||
|
||||
public void TrashItem(Item item)
|
||||
{
|
||||
RemoveItem(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user