The state behavioral pattern allows you to simplify your code when you have different modes of operation.