tamagochi script complejo
const tamagochi = { hp: 100, stats: { strenght: 10, resistance: 10, speed: 10, stamina: 10 }, inventory: { gold: 50 }, level: 1, alive: true, pos: { x: 0, y: 0 }, eat(food) { if (food === 'apple') { this.hp += 5; console.log('I ate an apple'); } else if (food === 'pizza') { this.hp += 10; console.log('I ate a pizza'); } else { console.log('I dont want to eat that'); } }, talk(string) { console.log(string); }, move(direction) { if (direction === 'up') { this.pos.y += 1; } else if (direction === 'down') { this.pos.y -= 1;