refactoring
This commit is contained in:
parent
ce55e6a545
commit
f6a5fb6985
1 changed files with 6 additions and 1 deletions
|
@ -170,7 +170,12 @@ impl<'g> Displacement<'g> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn move_all(&mut self) {
|
pub fn move_all(&mut self) {
|
||||||
while self.move_once() {}
|
loop {
|
||||||
|
let can_continue = self.move_once();
|
||||||
|
if !can_continue {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn move_once(&mut self) -> bool {
|
fn move_once(&mut self) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue