Skip to main content

draw

Function draw 

Source
pub fn draw(
    frame: &mut Frame<'_>,
    area: Rect,
    state: &GameState,
    zoom_idx: usize,
) -> Rect
Expand description

Draw the biscuit. Reads:

  • state.clench_ticks — counts down a click flash. While >0, the eye becomes * and the body shifts pink. The first CLENCH_SQUASH_TICKS of that countdown also drop the top blank row, giving a one-frame vertical squash before the spring back.
  • active ClickFrenzy buff — biscuit is tinted toward red and shakes ±1 col on clench frames. Pure visual chaos, no behavior change.
  • state.session_ticks — drives a slow ambient breathing color cycle so the biscuit isn’t completely static at idle.