whiskers-pet

How the cat behaves, with no drawing. The shell reports touches (in the cat's own units, so it only has to scale) and the conversation phase; tick(now) returns a PetView to draw: a mood, where the eyes look, and two counters.

Eyes ease toward the finger. A quick tap on the body is a poke and tickles the cat. Two fast turns round it make it dizzy, in either direction. The conversation phase sets the face (listening, thinking, working, speaking, tangled), touch outranks it, and a quiet minute and a half sends the cat to sleep. The counters (pokes, dizzy_spells) let the shell play a sound when one changes, so a sound cannot happen without its animation.

Time is always passed in, so every behaviour is tested exactly in tests/pet.rs.