fn heuristic( state: State, masks: &[u32], matrix: &[[Door; 30]; 30], cache: &mut FastMap<(usize, u32), u32>, ) -> u32