pseudo code isn't the psudocode quiescence search rather wrong when looking at chess in chess engines implementations would say make an evaluation of the current position without any search assuming this value is save try capture moves and maybe check giving moves to look whether we can reach more using quiescence search recursively looking at the current quiete position idea of wikipedia you will find assume you have a rather smooth position your queen can capture a pawn but your queen will get captured then we can detect quiet position only if we do that capture moves and decide no that pawn robbery was no good idea if we decide not a quiet position because we can capture we will find that we will loose our queen that result would be completely wrong and implementations are not done in chess engines in that way you can find a chess relevant correct description at benno