                "rotate" => {
                    let amount = match parts[1] {
                        "left" => parts[2].parse().unwrap(),
                        "right" => self.password.len() - parts[2].parse::<usize>().unwrap(),
                        "based" => {
                            let pos = self.find(parts[6]);

                            2 * self.password.len() - if pos >= 4 { pos + 2 } else { pos + 1 }
                        },

                        _ => panic!("Cannot rotate by {}", parts[2]),
                    } % self.password.len();