| 1747 | } |
| 1748 | |
| 1749 | staticfn boolean |
| 1750 | bydoor(coordxy x, coordxy y) |
| 1751 | { |
| 1752 | int typ; |
| 1753 | |
| 1754 | if (isok(x + 1, y)) { |
| 1755 | typ = levl[x + 1][y].typ; |
| 1756 | if (IS_DOOR(typ) || typ == SDOOR) |
| 1757 | return TRUE; |
| 1758 | } |
| 1759 | if (isok(x - 1, y)) { |
| 1760 | typ = levl[x - 1][y].typ; |
| 1761 | if (IS_DOOR(typ) || typ == SDOOR) |
| 1762 | return TRUE; |
| 1763 | } |
| 1764 | if (isok(x, y + 1)) { |
| 1765 | typ = levl[x][y + 1].typ; |
| 1766 | if (IS_DOOR(typ) || typ == SDOOR) |
| 1767 | return TRUE; |
| 1768 | } |
| 1769 | if (isok(x, y - 1)) { |
| 1770 | typ = levl[x][y - 1].typ; |
| 1771 | if (IS_DOOR(typ) || typ == SDOOR) |
| 1772 | return TRUE; |
| 1773 | } |
| 1774 | return FALSE; |
| 1775 | } |
| 1776 | |
| 1777 | /* see whether it is allowable to create a door at [x,y] */ |
| 1778 | int |
no test coverage detected