Added TileAttribute::hasAttribute helper function

TileAttribute::hasAttribute allows you to see if a tile has a particular
attribute without having to bloat your code with bitwise AND and
checking the result.
Code formatting and helpr function usage
Replaced bitwise ANDs with helper function

TileAttribute::hasAttribute(xxx, yyy)