Guest User

Untitled

a guest
Jan 17th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public boolean move(Maze rigting,int pos) //Righting = direction
  2. {
  3. if(rigting.goal == true)
  4. return true;
  5.  
  6. return (rigting.wallR != true) ? move(rigting.right, pos += 1) : false ||
  7. (rigting.wallD != true) ? move(rigting.down, pos += 10) : false ||
  8. (rigting.wallL != true) ? move(rigting.left, pos -= 1) : false ||
  9. (rigting.wallU != true) ? move(rigting.up, pos -= 10) : false;
  10. }
Add Comment
Please, Sign In to add comment