~eli_oat/marchagotchi

bc14d08b00386ec17818f51baac547b5898027e2 — eli_oat 2 years ago 415df87 master
linting is fun
1 files changed, 12 insertions(+), 12 deletions(-)

M marchagotchi.js
M marchagotchi.js => marchagotchi.js +12 -12
@@ 64,17 64,17 @@ const setSleepiness = (sleepiness, sleepinessDelta) => {
// player actions
const feedPet = (mealType) => {
	switch (mealType) {
		case 'full':
			setHunger(petStats.hunger, -25);
			setSleepiness(petStats.sleepiness, 10);
			break;
		case 'snack':
			setHunger(petStats.hunger, -5);
			setHappiness(petStats.happiness, 5)
			setSickness(petStats.sickness, 10);
			break;
		default:
			console.error('TERRIBLE ERROR! Incorrect mealType, ' + mealType);
    case 'full':
		setHunger(petStats.hunger, -25);
		setSleepiness(petStats.sleepiness, 10);
		break;
	case 'snack':
        setHunger(petStats.hunger, -5);
        setHappiness(petStats.happiness, 5);
		setSickness(petStats.sickness, 10);
		break;
    default:
        console.error('TERRIBLE ERROR! Incorrect mealType, ' + mealType);
	};
	isPetContent(petStats);
	isPetDead(petStats);


@@ 165,4 165,4 @@ const gameOver = () => {
	clearTimeout(timerId);
};

gamePlayLoop();
\ No newline at end of file
gamePlayLoop();