see whether it is allowable to create a door at [x,y] */
| 1776 | |
| 1777 | /* see whether it is allowable to create a door at [x,y] */ |
| 1778 | int |
| 1779 | okdoor(coordxy x, coordxy y) |
| 1780 | { |
| 1781 | boolean near_door = bydoor(x, y); |
| 1782 | |
| 1783 | return ((levl[x][y].typ == HWALL || levl[x][y].typ == VWALL) |
| 1784 | && ((isok(x - 1, y) && !IS_OBSTRUCTED(levl[x - 1][y].typ)) |
| 1785 | || (isok(x + 1, y) && !IS_OBSTRUCTED(levl[x + 1][y].typ)) |
| 1786 | || (isok(x, y - 1) && !IS_OBSTRUCTED(levl[x][y - 1].typ)) |
| 1787 | || (isok(x, y + 1) && !IS_OBSTRUCTED(levl[x][y + 1].typ))) |
| 1788 | && !near_door); |
| 1789 | } |
| 1790 | |
| 1791 | /* do we want a secret door/corridor? */ |
| 1792 | boolean |
no test coverage detected