valid method

See valid()'s description.
all_possible_(rotations/moves) will be needed in future.