From a2c658de6b2bdbcaf58ab7f6950247a9aa93adee Mon Sep 17 00:00:00 2001 From: aqys <51910@edu.sde.dk> Date: Wed, 25 Mar 2026 08:33:55 +0100 Subject: [PATCH] Food n Gun --- PeopleVille/Equipment/Food.cs | 15 ++++++++++----- PeopleVille/Equipment/Gun.cs | 14 +++++++++----- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/PeopleVille/Equipment/Food.cs b/PeopleVille/Equipment/Food.cs index 6afbcbd..c4c9d2c 100644 --- a/PeopleVille/Equipment/Food.cs +++ b/PeopleVille/Equipment/Food.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using PeopleVille.Person; namespace PeopleVille.Equipment { @@ -11,12 +9,19 @@ namespace PeopleVille.Equipment public void Equip() { - throw new NotImplementedException(); + Console.WriteLine(""); } public void Unequip() { - throw new NotImplementedException(); + Console.WriteLine(""); + } + + public void Consume(Person.Person person) + { + person.Health += HealthPoints; + Console.WriteLine($""); + person.Inventory.Remove(this); } } } diff --git a/PeopleVille/Equipment/Gun.cs b/PeopleVille/Equipment/Gun.cs index 821b926..269105a 100644 --- a/PeopleVille/Equipment/Gun.cs +++ b/PeopleVille/Equipment/Gun.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using PeopleVille.Person; namespace PeopleVille.Equipment { @@ -11,12 +9,18 @@ namespace PeopleVille.Equipment public void Equip() { - throw new NotImplementedException(); + Console.WriteLine(""); } public void Unequip() { - throw new NotImplementedException(); + Console.WriteLine(""); + } + + public void Shoot(Person.Person target) + { + target.Health -= this.Damage; + Console.WriteLine($""); } } }