Function play

Source
fn play(input: &(Vec<Vec<char>>, Vec<[usize; 3]>), reverse: bool) -> String
Expand description

get_disjoint_mut allows us to acquire two simultaneous mutable references to disjoint indices. A nice standard library feature is that we can collect an iterator of chars into a String for the final answer.