()
| 869 | } |
| 870 | |
| 871 | get_new_cords() { |
| 872 | let new_x = this.prev_x; |
| 873 | let new_y = this.prev_y; |
| 874 | let y_direction = this.y_direction; |
| 875 | let x_direction = this.x_direction; |
| 876 | let group_iter = this.group_iter; |
| 877 | if (!this.past_border_y()) { |
| 878 | if (this.past_border_x()) { |
| 879 | y_direction = -1 * this.y_direction; |
| 880 | new_x += this.x_direction; |
| 881 | } else { |
| 882 | x_direction = -1 * this.x_direction; |
| 883 | new_y += this.y_direction; |
| 884 | group_iter += 1; |
| 885 | } |
| 886 | } else { |
| 887 | new_y += this.y_direction; |
| 888 | } |
| 889 | return [ |
| 890 | new_x, |
| 891 | new_y, |
| 892 | group_iter, |
| 893 | x_direction, |
| 894 | y_direction, |
| 895 | new_x * this.column_width, |
| 896 | new_y * this.row_height, |
| 897 | ]; |
| 898 | } |
| 899 | |
| 900 | past_border_y() { |
| 901 | if (this.y_direction == 1) { |
no test coverage detected