Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean move(Maze rigting,int pos) //Righting = direction
- {
- if(rigting.goal == true)
- return true;
- return (rigting.wallR != true) ? move(rigting.right, pos += 1) : false ||
- (rigting.wallD != true) ? move(rigting.down, pos += 10) : false ||
- (rigting.wallL != true) ? move(rigting.left, pos -= 1) : false ||
- (rigting.wallU != true) ? move(rigting.up, pos -= 10) : false;
- }
Add Comment
Please, Sign In to add comment