โœฆ Code-Drawn Virtual Pet

Write code โ†’ your pet comes to life

Hunger
Happy
Energy
Pet draw function ยท ctx, t, state โ†’ draw anything
ctx = 2D canvas context ยท canvas is 220ร—220, pet center โ‰ˆ (110,110)
t = time in seconds (use for animation)
state.mood = "idle"|"happy"|"hungry"|"tired" ยท state.doing = current action string
state.hunger, state.happy, state.energy = 0โ€“100