GoF State pattern sample