Refactor namespaces to remove "Companion" and standardize to "PetCompanion"

This commit is contained in:
2025-02-02 12:45:00 -03:00
parent c433095eb8
commit 06455db598
24 changed files with 70 additions and 67 deletions

View File

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

View File

@@ -1,7 +1,7 @@
using Pet.Companion.Models;
using Pet.Companion.Repositories;
using PetCompanion.Models;
using PetCompanion.Repositories;
namespace Pet.Companion.Services
namespace PetCompanion.Services
{
public class PetService
{
@@ -28,7 +28,10 @@ namespace Pet.Companion.Services
UserId = userId.ToString(),
Name = petRequest.Name,
Class = petRequest.Class,
Health = 100,
MaxHealth = 100,
Level = 1,
Experience = 0,
Stats = PetStats.BuildFromClass(petRequest.Class),
Resources = new Resources(),
GatherActionSince = DateTime.UtcNow,
@@ -64,12 +67,12 @@ namespace Pet.Companion.Services
case PetBasicAction.FEED:
pet.Resources.Food -= 1;
pet.IncrementStrength(1);
pet.Health = Math.Min(pet.Health + 5, 100);
pet.Health = Math.Min(pet.Health + 5, pet.MaxHealth);
break;
case PetBasicAction.SLEEP:
pet.IncrementIntelligence(1);
pet.IncrementStrength(1);
pet.Health = Math.Min(pet.Health + 15, Pet.MaxHealth);
pet.Health = Math.Min(pet.Health + 15, pet.MaxHealth);
break;
case PetBasicAction.PLAY:
pet.Resources.Junk -= 1;