Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(w.hasStench(x+1, y)){
- if(isWumpus(x+1+1, y)){
- return true;
- }
- else if(isWumpus(x+1, y+1)){
- return true;
- }
- else if(isWumpus(x+1, y-1)){
- return true;
- }
- }
- else if(w.hasStench(x, y+1)){
- if(isWumpus(x+1, y+1)){
- return true;
- }
- else if(isWumpus(x, y+1+1)){
- return true;
- }
- else if(isWumpus(x-1, y+1)){
- return true;
- }
- }
- else if(w.hasStench(x-1, y)){
- if(isWumpus(x-1, y+1)){
- return true;
- }
- else if(isWumpus(x-1-1, y)){
- return true;
- }
- else if(isWumpus(x-1, y-1)){
- return true;
- }
- }
- else if(w.hasStench(x, y-1)){
- if(isWumpus(x+1, y-1)){
- return true;
- }
- else if(isWumpus(x-1, y-1)){
- return true;
- }
- else if(isWumpus(x, y-1-1)){
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement