Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function CheckWay(y, x, y1, x1, from, to, PipeType) {
  2.     if (x1 < 0 || y1 < 0 || x1 >= size || y1 >= size) {
  3.         return;
  4.     }
  5.     if (exits[pipes[y][x]][from] === exits[pipes[y1][x1]][to] && !used[y1][x1]) {
  6.         queue.push([y1, x1]);
  7.     }
  8. }
  9. function CheckLeftWay1(y, x, PipeType) {
  10.     CheckWay(y, x, y, x - 1, left, right);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement