| 757 | _ => Box::new(0..self.width - 1), |
| 758 | }; |
| 759 | if dir.x == 0 { |
| 760 | for y in yrange { |
| 761 | for x in 0..self.width { |
| 762 | let pos = Vec2 { |
| 763 | x: x as isize, |
| 764 | y: y as isize, |
| 765 | }; |
| 766 | let up = pos + dir; |
| 767 | let dir_right = Vec2 { |
| 768 | x: -dir.y, |
| 769 | y: dir.x, |
| 770 | }; |
| 771 | self.step_collapse(pos, up, dir_right); |
| 772 | self.step_fall(pos, up); |
| 773 | } |
| 774 | // for x in 0..self.width { |
| 775 | // let pos = Vec2 { x: x as isize, y: y as isize }; |
| 776 | // let up = pos + dir; |
| 777 | // let dir_right = Vec2 { |
| 778 | // x: -dir.y, |
| 779 | // y: dir.x, |
| 780 | // }; |
| 781 | // self.step_slide(pos, up, dir_right); |
| 782 | // } |
| 783 | } |
| 784 | } else { |
| 785 | for x in xrange { |
| 786 | // everything that can fall, will fall |
| 787 | for y in 0..self.height { |
| 788 | let pos = Vec2 { |
| 789 | x: x as isize, |
| 790 | y: y as isize, |
| 791 | }; |
| 792 | let up = pos + dir; |
| 793 | let dir_right = Vec2 { |
| 794 | x: -dir.y, |