Refactor namespaces to follow new naming convention and add item model classes

This commit is contained in:
2025-02-02 12:39:59 -03:00
parent 4e5addd1d5
commit 0a257199f7
27 changed files with 463 additions and 94 deletions

View File

@@ -1,7 +1,7 @@
using pet_companion_api.Models;
using pet_companion_api.Repositories;
using Pet.Companion.Models;
using Pet.Companion.Repositories;
namespace pet_companion_api.Services
namespace Pet.Companion.Services
{
public class PetClassService
{

View File

@@ -1,7 +1,7 @@
using pet_companion_api.Models;
using pet_companion_api.Repositories;
using Pet.Companion.Models;
using Pet.Companion.Repositories;
namespace pet_companion_api.Services
namespace Pet.Companion.Services
{
public class PetService
{
@@ -64,10 +64,12 @@ namespace pet_companion_api.Services
case PetBasicAction.FEED:
pet.Resources.Food -= 1;
pet.IncrementStrength(1);
pet.Health = Math.Min(pet.Health + 5, 100);
break;
case PetBasicAction.SLEEP:
pet.IncrementIntelligence(1);
pet.IncrementStrength(1);
pet.Health = Math.Min(pet.Health + 15, Pet.MaxHealth);
break;
case PetBasicAction.PLAY:
pet.Resources.Junk -= 1;