I'm not a fan of raw asserts. If you'd prefer to keep the assert, please put in a code comment explaining why the value must be 1 or 2 and consider adding a message.