Don't use bitwise and when checking state

It is not necessary to use bitwise and when checking the state of the
tile. It can only be in one state at a time so just check if it's equal
to the constant.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>