I think the author of that code could reasonably argue that its better for the 'wave' to finish before acting on another button.
But if a faster response was required then how about instead of calling delay having something like a delayAbort function that checked every 10 milliseconds or so if a switch was pressed and returned immediately if it was.