イロイッカイズツの計算

int iro;

階に入ったとき
   iro = 0;

部屋を移動した時
  if (次の部屋 == 前の部屋+1)
  {
      iro++;
      if (iro == 6) 門を開く;
  }
  else
  iro = 0;