wall(X,Y) :- X<1. wall(X,Y) :- X>5. wall(X,Y) :- Y<1. wall(X,Y) :- Y>5. thereIsaPit(1,5). thereIsaPit(5,5). thereIsaPit(5,1). thereIsaPit(2,3). thereIsaWumpus(4,4). gold(2,5). square(X,Y,B,S,G) :- aBreeze(X,Y,B), aStench(X,Y,S), aGlitter(X,Y,G). aBreeze(X,Y,breeze) :- thereIsaPit(X-1,Y). aBreeze(X,Y,breeze) :- thereIsaPit(X+1,Y). aBreeze(X,Y,breeze) :- thereIsaPit(X,Y-1). aBreeze(X,Y,breeze) :- thereIsaPit(X,Y+1). aBreeze(X,Y,none). aStench(X,Y,stench) :- thereIsaWumpus(X-1,Y). aStench(X,Y,stench) :- thereIsaWumpus(X+1,Y). aStench(X,Y,stench) :- thereIsaWumpus(X,Y-1). aStench(X,Y,stench) :- thereIsaWumpus(X,Y+1). aStench(X,Y,none). aGlitter(X,Y,glitter) :- gold(X,Y). aGlitter(X,Y,none).